What's wrong w/ this SQL statement (Full Version)

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



Message


Guest -> What's wrong w/ this SQL statement (6/22/2001 23:10:00)

This gets 'Too Few Paremeters' Exp 2. Error.:

SELECT * FROM Monkey WHERE ((Dept=left(': 1::',4)) AND ((Act/Plan=': 2::')))

However, this one works correctly:

SELECT * FROM Monkey WHERE (Dept=left(': 1::',4))

What is the right combination of parentheses when adding the AND qualifier? I've tried almost everything.





rdouglass -> RE: What's wrong w/ this SQL statement (6/22/2001 13:01:00)

I duuno with all those emoticons. However it looks to me you may have a prob with your column definition "Act/Plan" - I didn't think that / (slash) character was allowed when connecting ASP and FP db's but I'm not positive....




Guest -> RE: What's wrong w/ this SQL statement (6/22/2001 15:01:00)

Answer:
Renamed 'Act/Plan'to 'Type'and got rid of some unnecessary parenthesis's

SELECT * FROM StaffActuals WHERE Type=': 2::' AND Dept=left(': 1::',4)





Spooky -> RE: What's wrong w/ this SQL statement (6/22/2001 21:14:00)

Be careful using "type" as well. Its a reserved word in Access

http://support.microsoft.com/support/kb/articles/Q109/3/12.asp

------------------
§þððk¥
"I am Spooky of Borg. Prepare to be assimilated, babycakes!"
Subscribe to OutFront News
Database / DRW Q & A
The Spooky Login!
VP-ASP Shopping cart





Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.0625