Observation Tower at Antietam National Battlefield |
So
DECLARE @anameVarchar(100);
SELECT @aname= CASE
WHEN LEFT([Hospital],1)='_' THEN SUBSTRING([Hospital],2,len([Hospital])-1)
ELSE '_' + [Hospital]
END
FROM [dbo].[aTable]
WHERE ID =@ID;
UPDATE dbo.aTable
SET Hospital=@aname
WHERE ID =@ID
What this does is toggle the Hospital Field by inserting and removing an underscore. A quick and easy way to
No comments:
Post a Comment