Home Forums Article Discussions Article Discussions by Author Discuss Content Posted by Sean McCown Get Away From Confusing Code RE: Get Away From Confusing Code
Dennis D. Allen
Say Hey Kid
Points: 699
More actions
November 15, 2005 at 10:12 am
#603981
You could also look at QuoteName()
DECLARE @quote Char(1)
SET @quote = ''''
PRINT 'WHERE LastName = ' + QuoteName( @LName, @quote )
PRINT 'WHERE TDate = ' + QuoteName( GetDate(), @quote )
PRINT 'WHERE LDate = ' + QuoteName( GetDate() - 100, @quote )