Query For Transferring Money From One Account Into Another

Nov 29, 2013

Query for transferring money from one account to another account in same table..so from one account money should be deducted and need to be add into another account.

View 1 Replies


ADVERTISEMENT

How Can I Cast A Money Field In A View To Look Like Money

Oct 16, 2007

I have a special need in a view for a money column to look like money and still be a money datatype. So I need it to look like $100.00 (prefered) or 100.00(can make work).
If I convert like this '$' + CONVERT (NVARCHAR(12), dbo.tblpayments.Amount, 1) it is now a nvarchar and will not work for me.
How can I cast so it is still money? by default the entries look like 100.0000.
They must remain a money datatype.

View 9 Replies View Related

Whether To Use Local System Account Or Domain Account For Service Account

Jan 5, 2006

During install of SQL Server 2005, we can of course use a domain account or the built-in system account for running the services.  I lean toward domain for obvious reaons but would like to know a +/- to each option and why I'd choose one over the other and what consequences or limitations one may encounter if I choose one over the other.

View 6 Replies View Related

Conversion From Text To Money In A Query

Jun 21, 2006

Hi...

I've this type of data: 148.667,31 or 344.207.6 ... type text.
I need to convert it to money in a query...

How I can do this?

Thanks...

Paolo Manfrin

View 6 Replies View Related

SA Account (DBA System Account) Granting Priveleges But SQL Server 2000 Not Applying Them

Dec 4, 2006

I have been running a script in SQL Server 2000 as sa also as a Active Directory user who has administrator rights (I tested both approaches SQL Server then Windows Authentication) in Query Analyser which grants execute rights to the stored procedures within the database instance and Query Analyser does not give any errors when I run the script. I have made sure that each transaction has a go after it. I then return to Enterprise Manager, check the rights (I apply them to roles so that when we create another SQL Server user we just grant him/her rights to the role) and discover that the role has not been granted the rights. I seems to be occurring only with 2 of the procedures. Is there a known bug that might be causing this?

yours sincerely

Craig Hoy

View 9 Replies View Related

Using A SQL Query To Create A User Account.

Sep 17, 2005

I need to be able to have users run a query under the 'sa' account that will create another account that will just be used for reading and writing to a specific database.  Is there a way to do this with just a sql script or can you only set up logins and accounts from the enterprise manager?

View 1 Replies View Related

Float Type Steals My Decimal Points And Money Type Kills My Query

Mar 28, 2008

Happy Friday!
A while since I have posted a question, and this one is probably real easy.
I am trying to store numeric values from a php form in MSSQL 2000 database. However, the columns are set to float and if the value is 1.00, when entered into the table it is saved as 1

If I change the column type to money, the query fails, with an error message of conversion of datatype varchar to datatype money statement terminated.

anybody know what I need to do? do I need to do something in my query to specify that this is NOT varchar data?

View 2 Replies View Related

DTS Fails As A Job With Service Startup Account As "System Account"

May 9, 2002

I have several DTS jobs that runs well as a job with my nt login account for the SQL agent service startup account, but if I use the System account
they fail with this error.
" Error opening datafile: Access is denied. Error source: Microsoft Data Transformation Services Flat File Rowset Provider"

The data has change access to the System account under the NT security.

Thank you in advanced.

Jorge

View 2 Replies View Related

Xp_cmdshell Does Not Execute For Non-sysadmin Account Even With Proxy Account

Mar 2, 2004

Hi all, i hope you can help me.

Basically a dts package has been setup that pulls in data from another companies server, this data requires to be on-demand i.e individual users can pull in updates of the data when they require it.

I am using xp_cmdshell and dtsrun to pull in the data. This obviouly works fine for me as i am a member of sysadmin.

Books online quotes " SQL Server Agent proxy accounts allow SQL Server users who do not belong to the sysadmin fixed server role to execute xp_cmdshell"

So i went to the SQL Server Agent Properties 'Job System' tab and unchecked 'Non-sysadmin job step proxy account' and entered a proxy account.

The proxy account has been setup as a Windows user with local administrator privilages and even a member of the sysadmin server role - just in case.

Now when i log onto the db with my test account - a non-sysadmin - and attempt to run the stored proc to import the data i recieved the message 'EXECUTE permission denied on object 'xp_cmdshell', database 'master', owner 'dbo' '

hmm... so basically i have either misunderstood BoL or there is something not quite right in my setup.

I have search the net for a few days now and yet i can find no solution.

Can anyone help?

View 2 Replies View Related

Date / Time Query To Account For Weekend

Jun 9, 2014

I am looking to create a query to select data to accomodate the weekend. For example, If today is Monday, then select Friday's records. This only has to be done for Monday's. For each additional day there would be a date difference of just 1 not 3. I hard code the date diff when Monday rolls around. how to make that specific so the CT.workeddate = what I have in my Where clause.

SELECT CT.ContactId, CT.OutreachId, CT.SchedulerId, CT.WorkedDate, CT.OutreachStatusId, CT.UpdateBy, C.CampaignID, C.PlanID, C.ProgramId, M.MarketID,
M.MarketStateName, CT.AppDate, DATENAME(dw, CT.WorkedDate) AS DayofWeek, DATEADD(Day, CASE DATENAME(WEEKDAY, GETDATE())

[code]....

View 5 Replies View Related

Domain Account Vs Local Account For SQLServerAgent

Jul 20, 2005

Hi there,BOL notes that in order for replication agents to run properly, theSQLServerAgent must run as a domain account which has privledges to loginto the other machines involved in replication (under "SecurityConsiderations" and elsewhere). This makes sense; however, I waswondering if there were any repercussions to using duplicate localaccounts to establish replication where a domain was not available.Anotherwords, create a local windows account "johndoe" on both machines(with the same password), grant that account access to SQL Server onboth machines, and then have SQL Server Agent run as "johndoe" on bothmachines. I do not feel this is an ideal solution but I havecircumstances under which I may not have a domain available; mypreliminary tests seem to work.Also, are there any similar considerations regarding the MSSQLSERVERservice, or can I always leave that as local system?Dave

View 1 Replies View Related

SqlCacheDependency Query Notifications -- Correct Permisisons -non Dbo Owner Account

Jul 5, 2007

 
Hi,
I am using SqlCacheDependency with the query notifications of SQL server 2005.
It is working nicely with the dbo.owner account but not with my web user account,
so I am thinking something is wrong with the permissions. 
After searching around, it seems that the main permissions to enable are these:
GRANT SUBSCRIBE QUERY NOTIFICATIONS TO theAccount
GRANT RECEIVE ON QueryNotificationErrorsQueue TO theAccount
GRANT REFERENCES on CONTRACT::[http://schemas.microsoft.com/SQL/Notifications/PostQueryNotification] to theAccount
GRANT SELECT TO theAccount.
 
I enabled these and it still doesn't work.  When I change my table, my cache is not getting invalidations.
Does anyone know what could be going on?  Or perhaps how can I trace the problem and get some clues?
thanks so much,
-tajmahal
 
 

 
 
 
 
 
 
 
 
 
 
 
 
 

View 3 Replies View Related

SQL Server 2008 :: Query To Generate Report Of Locked Account

Jan 9, 2011

Just wondering if there is any query which can give me report of locked account in SQL 2008. I know there are options like:-

1) Can go in ssms--security--account and right click and select status. This is applicable to individual account.

2)SELECT LOGINPROPERTY('accountid', 'IsLocked'). Also applicable to individual account

3) SELECT name,type_desc,is_disabled,modify_date,default_database_name from sys.server_principals order by type_desc

Generate the report but give the informatio as is_disabled. But I think is_disabled <> is_locked.

View 5 Replies View Related

SQL Server 2008 :: Query To Find Service Account Through Which It Is Running?

Jul 23, 2015

Without going to services.msc / configuration manager, is there anyway to know the service account through which SQL server is running?

View 6 Replies View Related

Domain Account Without A SQL Login Account

Apr 25, 2007

I have a situation that I have discovered in our QA database that I need to resolve. When I looked at the Activity Monitor for our server, I discovered that a process is running under a domain user account for one of our .Net applications. The problem is that that domain user account has not been created as a SQL login account on the server. I am trying to figure out how someone can log in to the database server with a domain user account that has not been added to SQL Server as a login account.



Does anyone have any insight on this? I don't like the idea of someone being able to create domain account that can access the database without me granting them specific access.



- Larry

View 6 Replies View Related

Transferring Databases

Mar 21, 2007

Hi
I created some databases on my pc at work (using Visual Web Developer 2005 and Microsoft SQL Server Express), I now wish to move them onto my home machine, Can I do this by simply copying the .MDF files and then moving them into the App_Data folder of my new app?
Do MDF files contain everything (schema, data, stored procedures etc) or am I missing something?
Cheers, Adam

View 5 Replies View Related

Transferring Database

Mar 23, 2001

Hi !

Currently I need to transfer existing database to another server. Unfortunately, after restoring all database file, user information is not available. It is stored in Master database.

I would like to know how can I transfer user login, database access, store procedures to another server ?

Please advise. Thanks !

View 3 Replies View Related

Transferring Data From One Db To Another

Nov 22, 2000

In Sql 6.5 there was an option to Transfer the db. I used this quite often to make a duplicate test db of my production db. Under 7.0 I haven't found it so easy to do this. DTS wizard hasn't worked well for me. I can get it to transfer tables but not all of the objects. Any ideas? Thanks.

View 5 Replies View Related

Transferring Logins

Jan 7, 2001

I have to transfer a database to a new machine. I am planning on doing a backup and restore. My question is, will the logins and roles be transferred along with the database?

thanks

View 6 Replies View Related

Transferring Databases From 6.5 To 7

Dec 6, 1999

This is the situation: I had a SQL 6.5 server with some databases. I still have access to the .dat files, however, SQL 6.5 will not start anymore. Is it possible to copy the .dat files to the new sql 7 server and somehow get them imported into the new SQL 7 server? Any help would be greatly appreciated.

Thanks
Charl
(please also copy my email address if possible when you reply)

View 1 Replies View Related

Transferring DTS Packages...

Oct 19, 2005

Hi Everyone,
Have anyway come across any easy method of transfers DTS packages across two servers which are existing on two different networks.

I haven't been able to use the method mentioned in article "DTS How to...Transfer Packages between Servers.." since the two servers I'm trying to move TO and move FROM are on two different networks which aren't visible to each other for my to register from the same box.

Appreciate if someone to point me to a means of doing this or any articles that explain how to do this..

thank you

View 9 Replies View Related

Transferring Data

Apr 6, 2001

Hi,

We have a SQL 6.5 database that was expanded larger than was really necessary. I have created a smaller size database and am wondering what the easiest way would be transfer ALL of the data and objects from the existing database into the new one.
Is SQL transfer manager reliable? Are there any better ways?

Thanks,

Sundar.

View 1 Replies View Related

Transferring SP`s Between Databases

Sep 8, 1998

While doing a database transfer between servers (using transfer manager), it does not copy all of my stored procedures. Any ideas?

View 1 Replies View Related

Transferring DTS Packages

Oct 16, 2001

How do i transfer DTS packages from SQL 2K server to another? Since the no.of packages is high i don't want to edit them individually and do a 'Save As'.
Thanks

View 2 Replies View Related

Transferring SQL Server DB

Apr 27, 2004

I appreciate this may appear to a bit of a noob question but bear with me! ;)

I'm having a problem when I transfer my locally developed MS SQL server db to my hosts server.

I am logging into the host server and then importing the tables and data from my local machine. All the tables and data then get transferred alright but the ID colums lose the primary key and identity setting and any default values in the table structure also get lost.

This means I then have to go through each table on the host server an put things straight. A pain in the bum... I've tried creating the table structure using a SQL script which keeps the ID colum but not the default values.

Why is this happening and how can I resolve it?

Thanks in advance

Phil

View 6 Replies View Related

Transferring Of Data,

Aug 1, 2003

hope some one can help me

i have a couple of tables interlinked, and in one table it has a column named contact with such info in as S Smith, John Burn.
and i need to split this up, so it can go into a number of other columns in another table, such as initials, name surname.

the best ive come up with so far is, isnt very good.

thanx in anticipation

View 1 Replies View Related

Transferring Data

Aug 10, 2005

Hi! I am trying to import a file from excel into Enterprise Manager. I have found the wizard that does this, but I can't seem to find the table I want to import the file into. What am I doing wrong? Thanks for any help you can give.

Scott

View 14 Replies View Related

Transferring Data

Aug 14, 2005

Hi! I am importing data from an Excel file into SQL. I am getting the following error message: Error during Transformation 'DirectCopyXform' from Row number 32. Errors encountered so far in this task: 1
Destination does not allow NULL on column pair 1(source column 'F1'(DBTYPE_R8), destination column 'agentno' (DBTYPE_14))

Anyone know why this is and how to correct it?

Thanks for any help!

Scott

View 18 Replies View Related

Transferring From SQL 6.5 To SQL 2000

Jul 20, 2005

HiI am a novice with SQL server as i have experience with access. I needto do some front end development in access for a client who runs SQL6.5 or so he tells me... (i have been told that data files under 6.5are .dat and under 7.0 they are .mdf? is this correct?)I have taken a copy of the data file which is an mdf file with theintention of running it on my machine which has SQL 2000 Developer Edinstalled on windows XP pro.I cannot attach the database as i do not have the log files, i cannotuse DTS as the database is not registered with sql server.do i need to get a copy of the log .ldf files before i can progress?Is there any other files i need?

View 2 Replies View Related

Help In Transferring .DBF To SQL Server

Apr 17, 2007

Hi Mohan, Would u pls help me in working with the SSIS,



I just wanted to know from where to start,

for e.g...

!.how to Transfer DBF of 3 mb of *.dbf to sqlserver.

2.pls mention step by step.



waiting for ur reply,



Regards,

Vishwanath

View 1 Replies View Related

Transferring Data From One Table To Another But Add One More Value

Feb 27, 2007

- INSERT INTO TABLE2 (COL1, COL2, COL3) SELECT COL1, COL4, COL7 FROM TABLE1
- what i want is i
  INSERT INTO TABLE2 (COL1, COL2, COL3) SELECT COL4, COL7 FROM TABLE1 Username
  (add one more value exp: Username)

View 2 Replies View Related

Transferring One Table To Another Server ?

Jan 6, 2005

Hello,

I have a table on one server that I would like to copy over to another server. I have done the full backup and restore, however that seems to overwrite the formatting on all of my existing tables. As there are some differences in the tables between servers, I would prefer to not have to do the full restore. I have been able to use the SQL export utility to copy a table from one database to another on the same server, but I was wondering how that can be done between different servers with different Windows logins.

Thanks for any help anyone can provide.

View 1 Replies View Related

Transferring Databases Between Servers

Feb 15, 2002

I need some advice on copying databases, stored procedures, views, logins ..etc from a SQL Serevr 7.0 server, to a new SQL Server 2000 server.
Is it better to backup the databases on one server and then restore them to the other. Or id it easier to use the Wizards to Import everything from new server, or to Export everything from the old server ?

Any advice would be appreciated. I need to ensure that I do not miss anything, in particular Stored Procedures in the old master database.

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved