Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Simple sql select problem

Simple sql select problem

From: johnf <john_at_mainframe.co.uk>
Date: Thu, 17 Jan 2002 13:43:01 -0000
Message-ID: <kxA18.36630$ru2.464132@NewsReader>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US