Explain and where xxxx Like ...... [message #19269] |
Thu, 07 March 2002 14:26 |
PeeDee
Messages: 1 Registered: March 2002
|
Junior Member |
|
|
Want to add more columns of the same ie. bed1,bed2 etc.Is there an easire way.
1.SELECT eggs,tomato,potatoes,beans
FROM garden
where grown between to_date('2001-10-01 00:00:00','yyyy-mm-dd hh24:mi:ss') and
to_date('2001-10-01 00:00:00','yyyy-mm-dd hh24:mi:ss') and bed1 like '%myplot%'
Is the script below correct?It gives me the wrong answ.
2.SELECT eggs,tomato,potatoes,beans
FROM garden
where grown between to_date('2001-10-01 00:00:00','yyyy-mm-dd hh24:mi:ss') and
to_date('2001-10-01 00:00:00','yyyy-mm-dd hh24:mi:ss') and bed1 like '%myplot%'
and bed2 like '%myplot%'
and bed3 like '%myplot%'
and bed4 like '%myplot%'
and bed5 like '%myplot%'
|
|
|
Re: Explain and where xxxx Like ...... [message #19286 is a reply to message #19269] |
Fri, 08 March 2002 04:25 |
Suresh Vemulapalli
Messages: 624 Registered: August 2000
|
Senior Member |
|
|
SELECT eggs,tomato,potatoes,beans
FROM garden
where grown between to_date('2001-10-01 00:00:00','yyyy-mm-dd hh24:mi:ss') and
to_date('2001-10-01 00:00:00','yyyy-mm-dd hh24:mi:ss') and ( bed1 like '%myplot%'
or bed2 like '%myplot%'
or bed3 like '%myplot%'
or bed4 like '%myplot%'
or bed5 like '%myplot%')
|
|
|