Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 what am I doing wrong in query

Author  Topic 

Novice2Sql
Starting Member

33 Posts

Posted - 2012-10-15 : 06:55:03

Resolved

sunitabeck
Master Smack Fu Yak Hacker

5155 Posts

Posted - 2012-10-15 : 07:01:55
Are you using Microsoft SQL Server? "Now" is not a T-SQL function. This forum specializes in Microsoft SQL Server, so if you are using another DBMS, a forum such as dbforums.com would be more appropriate.

Also, I see several commit's without any corresponding Begin Tran's.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-10-15 : 10:38:50
If its T-SQL replace Now() with GETDATE()

and also commit should be commit tran <transaction name> and should have a corresponding begin tran

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

Novice2Sql
Starting Member

33 Posts

Posted - 2012-10-16 : 06:10:36
Thanks I have resolved the problem.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-10-16 : 09:08:33
welcome

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-10-17 : 23:10:39
quote:
Originally posted by Novice2Sql


Resolved


Why did you remove the original question?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -