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 -> Oracle query - matching fields

Oracle query - matching fields

From: Tim <tbilida0617_at_rogers.com>
Date: Sat, 21 Sep 2002 15:53:38 GMT
Message-ID: <3D8C9694.4050706@rogers.com>


Hello;

I've got an Oracle query question that I hope someone can give me some assistance with. (I'm using 8i personal edition). I have a table which has first initials and last names in it. I have another table which has first initials and last names in it, all capitalized (ie. 'J' and 'SMITH').
Some of the last name columns in one table have an additional space in it (the one which is not capitalized, ie 'J' and 'Smith '). What can I do to get them to match?

This is the SQL statement before trying to solve the above mentioned problem.

select '1' AS TYP, first_initial || '. ' || last_name, Count(*) AS CNT from scoring WHERE date >= '01-Oct-01' AND date <= '14-Apr-02' AND UPPER(first_initial || '. ' || last_name) IN ('J. BLOW','B. SMITH') GROUP BY first_initial || '. ' || last_name, ORDER BY first_initial || '. ' || last_name;

THis will work but will not solve the above mentioned problem

Any ideas,
Tim Received on Sat Sep 21 2002 - 10:53:38 CDT

Original text of this message

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