| Author |
Topic  |
|
|
tranquilraven
Starting Member
19 Posts |
Posted - 06/08/2012 : 11:13:16
|
But I keep getting an error saying Your SQL is invalid: An expression of non-boolean type specified in a context where a condition is expected, near 'Code'.
Huh? I really, really want to understand this. Can someone please help explain what I am doing wrong, here is the code:
SELECT ProductCode, ProductPrice, ProductWeight
FROM Products
Where Product Code IN (RP2000,RP600,RP800,RP1000,F2000C,F1500C,F1000C,F700C,F600C,SFS2000,SFS1000,SFS600,F400C,RP400);
ORDER BY ProductCode
|
|
|
Lamprey
Flowing Fount of Yak Knowledge
3833 Posts |
Posted - 06/08/2012 : 11:14:58
|
| Perhaps the values in your IN clause are actualy strings and need to be enclosed in single quotes? |
Edited by - Lamprey on 06/08/2012 11:15:11 |
 |
|
|
khtan
In (Som, Ni, Yak)
Singapore
16746 Posts |
Posted - 06/08/2012 : 11:16:45
|
Where ProductCode IN ('RP2000', 'RP600', 'RP800', 'RP1000', 'F2000C', 'F1500C',
'F1000C', 'F700C', 'F600C', 'SFS2000', 'SFS1000', 'SFS600', 'F400C', 'RP400');
ORDER BY ProductCode
KH Time is always against us
|
 |
|
|
tranquilraven
Starting Member
19 Posts |
Posted - 06/08/2012 : 11:17:00
|
Nope same error.
quote: Originally posted by Lamprey
Perhaps the values in your IN clause are actualy strings and need to be enclosed in single quotes?
|
 |
|
|
tranquilraven
Starting Member
19 Posts |
Posted - 06/08/2012 : 11:19:30
|
LOL. Thank you both, you were both right. I misspelled ProductCode and I needed the quotes. Bless you both.
quote: Originally posted by khtan
Where ProductCode IN ('RP2000', 'RP600', 'RP800', 'RP1000', 'F2000C', 'F1500C',
'F1000C', 'F700C', 'F600C', 'SFS2000', 'SFS1000', 'SFS600', 'F400C', 'RP400');
ORDER BY ProductCode
KH Time is always against us
|
 |
|
| |
Topic  |
|
|
|