Using the OR command in IF (Full Version)

All Forums >> [Web Development] >> ASP and Database



Message


awildish -> Using the OR command in IF (10/3/2001 20:34:00)

I've created an SQL statement which I'm using in ASP but I can't for the life of me remember how to write a long statement with several OR commands. Can anyone help... this is what I've got:

SELECT Author, Title, Date, Context, Description, Location FROM DisasterAudit WHERE Author LIKE '%" + Replace(disasterRSQry__MMColParam, "'", "''") + "%'" or Title LIKE '%" + Replace(disasterRSQry__MMColParam, "'", "''") + "%'" or Date LIKE '%" + Replace(disasterRSQry__MMColParam, "'", "''") + "%'" or Context LIKE '%" + Replace(disasterRSQry__MMColParam, "'", "''") + "%'" or Description LIKE '%" + Replace(disasterRSQry__MMColParam, "'", "''") + "%'" or Location LIKE '%" + Replace(disasterRSQry__MMColParam, "'", "''") + "%'"

I expect it's something quite simple but it's baffling me!!!





Vince from Spain -> RE: Using the OR command in IF (10/3/2001 14:27:00)

If this be VB, then do you just want to replace the + with an & for string concatenation?

Vince

------------------
Internet Business Solutions S.L.(Spain)





Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.046875