Page 1 of 1

Unknown column 'x' in field list or where clause

Posted: Sat Aug 11, 2012 3:28 am
by One Big Yawn
Greetings,

I am trying to run some reports based on a queries that include parameters. In the select statement of one, I have an IF statement

Code: Select all

IF(columnA= 'X', 123, 456)
X here is a string.

that gives me a
Unknown column 'X' in field list
Likewise, I have another query running

Code: Select all

WHERE columnA = 'Y'
where Y is a string

which yields and error
Unknown column 'Y' in 'where clause
I'm not sure what this means, as my SQL seems legit. I thought it might have something to do with syntax or using ' compared to `, but I'm not sure. Kind of sucks too, because I was ready to go live today... now I have to submit a watered down version. :ouch:

cheers