Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: JOIN !!
You can use one of the queries bellow:
select * from county, region
where county.county like region.state||'.%';
select * from county, region
where substr(county,1,instr(county,'.')-1)=state;
Nandakumar a écrit dans le message <7pfdj2$nfa$1_at_nnrp1.deja.com>...
>Hi
>
>This is a question in JOINs.
>
>There are two tables, one with REGION and STATE, and another with
>COUNTY. Each county in a state will start with the name of that state,
>like NY.XX,NJ.YY etc. (!! XX and YY are name of the counties)
>
>The goal is to join these two tables to list
>REGION, STATE, and COUNTY.
>
>I tried some queries with LIKE. But no rows are selected.
>If there is a solution to this other than using CURSORs, i would be
>interested in it.
>Thanks
>-
>Nandakumar
>
>
>Sent via Deja.com http://www.deja.com/
>Share what you know. Learn what you don't.
Received on Thu Aug 19 1999 - 02:40:35 CDT