[thelist] SQL

kev.skindrill kev.skindrill at bigfoot.com
Fri Aug 11 15:50:04 CDT 2000


> Yo Kev!!
Back atcha Steve ;)

> Looks like you've missed the single quotes around your string value
> "request.form("minsize")"
>
> As a result, it's parsing the value into the SELECT string.

Umm, where exactly should I have the single quotes around the string value
request.form("minsize")? I'm not actually using that in the SQL statement, I
used that as an example of what did work. What I'm doing is following the
same pattern as I'm using to get a list of ticked check boxes i.e. passing a
comma seperated string to an SQL statement

("SELECT * FROM Deliveries where MinimumVehicleSize = ("& pcnum &") and
Available = 1")

so in the case I am testing it would literally read

("SELECT * FROM Deliveries where MinimumVehicleSize = ("Motorbike, Transit,
7 Ton Truck ") and Available = 1")

The string is being passed because it is showing up in the error statement

Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in
query expression 'MinimumVehicleSize IN (Motorbike, Transit, 7 Ton Truck)
and Available = 1'.

So what is the missing operator? And thanks Rudy for your input but I'm
afraid that didn't work either

SELECT * FROM Deliveries where MinimumVehicleSize IN ("&pcnum&")

Any other ideas peeps?
Cheers
K








More information about the thelist mailing list