Notices
Computer & Technology Related Post here for help and discussion of computing and related technology. Internet, TVs, phones, consoles, computers, tablets and any other gadgets.

any sql server guru's on here?

Thread Tools
 
Search this Thread
 
Old 04 November 2002, 11:42 AM
  #1  
GaryK
Scooby Regular
Thread Starter
 
GaryK's Avatar
 
Join Date: Sep 1999
Location: Bedfordshire
Posts: 4,037
Likes: 0
Received 0 Likes on 0 Posts
Post

got problems with @@IDENTITY and Insert triggers, anyone faced (and sorted) this problem, its a known problem in SQL7 but shouldnt be in 2K.

Thanks

Gary
Old 04 November 2002, 01:20 PM
  #2  
dharbige
Scooby Regular
 
dharbige's Avatar
 
Join Date: Feb 2001
Posts: 845
Likes: 0
Received 0 Likes on 0 Posts
Post

What's the problem?

If it's getting the IDENTITY that occurred in the INSERT you performed, rather than the IDENTITY updated by any triggers that are around, try using SCOPE_IDENTITY() instead.
Old 04 November 2002, 01:40 PM
  #3  
GaryK
Scooby Regular
Thread Starter
 
GaryK's Avatar
 
Join Date: Sep 1999
Location: Bedfordshire
Posts: 4,037
Likes: 0
Received 0 Likes on 0 Posts
Post

thanks dh, thats what I was using but it still wasn't working, I am using IDENT_CURRENT(<tablename&gt and that works a treat!

Thanks for your help.

Gary
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
hooksin
ScoobyNet General
8
02 January 2001 03:47 PM
Markus
Non Scooby Related
0
30 November 2000 10:11 AM
Puff The Magic Wagon!
Non Scooby Related
5
06 November 2000 08:09 PM



Quick Reply: any sql server guru's on here?



All times are GMT +1. The time now is 08:32 AM.