Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Simple sql select problem
Folks
The query below returns the likes of Hampshire,Essex, etc., however if the
county field is blank
it does not return a row for that record
.
How do i rectify the sql to return records with no county entered 'without'
using an
additional OR clause the reason for this is because the sql is built
dynamically and there are lots
of fields that can end up in the query.
Could I somehow add ' ' to the beginning and end of upper(COUNTY) so it
might return it
Suggestions Welcome
SELECT email, surname, forename, telephone FROM tblAddressbook
WHERE owneremail='john_at_mainframe.co.uk'
AND (upper(COUNTY) Not Like '%LONDON%' );
Cheers
Johnny
Received on Thu Jan 17 2002 - 07:43:01 CST