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

Re: Oracle query - matching fields

From: Tim <tbilida0617_at_rogers.com>
Date: Sat, 21 Sep 2002 17:21:15 GMT
Message-ID: <3D8CAB1D.6040209@rogers.com>


Solved it. Thanks for reading.

Tim

Tim wrote:

> 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 - 12:21:15 CDT

Original text of this message

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