SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 does ident_current() work for uniqueidentifer also
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Halyal
Starting Member

India
1 Posts

Posted - 09/30/2009 :  14:31:17  Show Profile  Reply with Quote
I have a table where uniqueidentifer is the primary key and is
generated with newid() in default value.
How do I get the last value generated.



Rajesh Halyal

tkizer
Almighty SQL Goddess

USA
37287 Posts

Posted - 09/30/2009 :  15:46:46  Show Profile  Visit tkizer's Homepage  Reply with Quote
You can't use the identity functions as you've found.

Generate the GUI first and put it into a variable. Use the variable to insert into your table.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000