PDA

View Full Version : Whats wrong with this select statement


dawilis
08-27-2002, 10:04 AM
I keep getting this error Syntax error in WHERE clause.

RSvoucher.Source = "SELECT * FROM voucher WHERE group ='" & Request.QueryString("cat") & "'"

allida77
08-27-2002, 01:57 PM
"Group" is probaly a reserved word or Request.QueryString("cat") may be returning a "" value.

Roy Sinclair
08-28-2002, 12:51 AM
Originally posted by allida77
"Group" is probaly a reserved word or Request.QueryString("cat") may be returning a "" value.

Group definitely is a reserved word, it's used in "Group by" clauses.

This will work:

RSvoucher.Source = "SELECT * FROM voucher WHERE [group] ='" & Request.QueryString("cat") & "'"

dawilis
08-28-2002, 02:01 AM
the smallest things - the biggest pains

whammy
08-28-2002, 02:02 AM
I assume it's working for you now?

dawilis
08-28-2002, 02:08 AM
ta