I have a script on a page that queries our document management system for some documents. The script works fine until I try to use search criteria that uses the traditional reserved words or special characters. Here's the string:
strSQL = "SELECT rev.dDocTitle, rev.dDocType, rev.dRevLabel, rev.dInDate, rev.dSecurityGroup, rev.dDocName, rev.dWebExtension " &_
"FROM DocMeta doc INNER JOIN Revisions rev " &_
"ON doc.dId = rev.dId " &_
"WHERE rev.dDocType = 'News' AND " &_
"rev.dRevLabel = '1' AND " &_
"rev.dStatus = 'Released' AND " &_
"rev.dInDate >= dateadd(day, -25, getDate()) AND " &_
"doc.xSponsorDepartment LIKE 'Technology and Operations' " &_
"ORDER BY rev.dInDate DESC;"
The bold line is the issue. How do I include words like "and" or special characters like "%" within the ASP code?
Thanks!