I have this script:
DELETE FROM [Tags] WHERE Id = CONVERT(uniqueidentifier, '7373D1A0-CB6A-4207-87C4-AE2939FD20C0');
GO
INSERT INTO [Tags] VALUES (CONVERT(uniqueidentifier, '7373D1A0-CB6A-4207-87C4-AE2939FD20C0'), 'Business');
GO
I want to declare a @businessId
constant to hold the result from my
CONVERT(uniqueidentifier, '7373D1A0-CB6A-4207-87C4-AE2939FD20C0')
The end result should look cleaner:
DELETE FROM [Tags] WHERE Id = @businessId;
GO
INSERT INTO [Tags] VALUES (@businessId, 'Business');
GO
Is there a way to do this in SQL Server CE 4? If no, is there a way to do this in SQL Server?
Thank you for your help.