Difference between revisions of "GUID fromString N"

From RayHarwood
Jump to: navigation, search
(Created page with "There are several formats acceptable for GUIDs, but SQL only accepts "D-Format" GUIDs when inserting into the database. If you have a 32 character hex string (an "N-Format" G...")
 
 
Line 37: Line 37:
  
 
Then, when doing an insert, use the function in a manner similar to this:
 
Then, when doing an insert, use the function in a manner similar to this:
 +
 +
  INSERT INTO [MyDatabase].[dbo].[DestinationTable]
 +
            ([GoodGUID]
 +
            ,[OtherInfo])
 +
  select
 +
            [MyDatabase].dbo.GUID_fromString_N(S.[StringKeyField])
 +
            ,'Oh yeah, we did it!'
 +
  FROM [MyDatabase].[dbo].[SourceTable]  S

Latest revision as of 18:50, 22 October 2013

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox