Um you need quotes around the %word% and probably some parenthesis and kill
the last where
ie
elect * from mytable where (field1 like '%word%' or field2 like '%word%')
and field3=number
kw
/* Keith Warno
** Developer & Sys Admin
** http://www.HaggleWare.com/
*/
----- Original Message -----
From: "Brevsville Administrator"
To:
Sent: 09 June 2000, Friday 12:22
Subject: [SLE] SQL syntax
I am not very good at SQL I'm just a lowly java programmer. So I have no
ideas why this SQl statement is wrong:
elect * from mytable where field1 like %word% or field2 like %word% and
where field3 = number
if I leave the "and where field3 = 2 " out the query works.
The column is an int so that should work and indeed if I use "select *
from mytable where field3 = 2" that works....
What is wrong with this (or me) ?
Thanx
Chris
I'm lazy.. I'd rather smile and be happy, than work my face muscles so hard
to frown... why not join me!!!
--
To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com
For additional commands send e-mail to suse-linux-e-help@suse.com
Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
--
To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com
For additional commands send e-mail to suse-linux-e-help@suse.com
Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/