Microsoft
Software
Hardware
Network
Question : how so I get the uniqueidentifier after insert in SQLEXPRESS?
I need to create a batch number for entering a set of records. I have a batch table that stores the unique batch number and other information about the batch. When the user clicks "New" to create a new batch, I use the Insert command to add the record. But then I need the uniqueidentifier that was created for the batch number. What is the SQL syntax for this?
Thanks in advance!
Answer : how so I get the uniqueidentifier after insert in SQLEXPRESS?
DECLARE @GUID uniqueidentifier
SET @GUID = NEWID()
INSERT Item VALUES (@GUID,'Yak Hoof')
and return the value of @GUID as output parameter
Random Solutions
Creating Query in MS Access 2003
increasing Checkbox index in a loop
PowerPoint AddIn/Custom Ribbon generating macro error
Limit number of displayed rows in continuous form
Convert MTS to an AVI that works in Power Point 2003
How can I enable a template item accoding to query result ?
Difference between coding in module, sheet, or workbook window
Locate Corrupt Record In An Access Table
CSS Sheets
Need to deploy/upgrade an Access application