| Posted by Simon Hayes on 09/20/05 15:05 
Use two single quotes - see "Using char and varchar Data" in BooksOnline.
 
 SELECT @strsql = 'SELECT * FROM tblTest WHERE Field1 Like ''blah'
 
 Also, avoid using double quotes around strings - they're treated as
 identifier delimiters when SET QUOTED_IDENTIFIER is ON, and since you
 need that option ON to use indexed views and indexed computed columns,
 it's best to stick to single quotes in all cases. See "Delimited
 Identifiers" in Books Online for more details.
 
 Simon
  Navigation: [Reply to this message] |