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
How do I replace RunCommand acCmdImport in Access 2007?
Vista or XP Software for Windows 7
How to access a Windows 7 printer from a Windows 98 SE PC ?
VB program connecting to Access DB - arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
get names of sheets
Mail-Merge Methods C#
SelectSingleNode question
Strategy for Interpreting Questionnaire Responses on Report
How can I convert or cast data in a query to an Access Database?
access DOCmd.output report