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
A custom macro in this report has failed to run, and is preventing the report from rendering.
How do I programmatically create a database in vb.net 2k8, 2k10
SUMPRODUCT formula for capturing occurrence
Excel Format Conditional Formatting w/ 4 Conditions
Users receive Active X error when opening email attachments
Access 97 tables corrupted after conversion to 2003
Tiff File Compression
How to do DoCmd.RunSql Select? Need to get values from table into VBA variables
Remove DELETE permissions but still allow MOVE
How to release connections to XP shares automatically