> > Dear Experts!
> > I have 02 tables:
> >
> > table1
> > phyto_no
> > PCKS/33857/-06-07
> > PCKS/33858/-06-07
> > PCKS/790/06-07
> > PCKS/1381/06-07
> > PCKS/1487/06-07
> > PCKS/2032/06-07
> > PCKS/306/-06-07
> > PCKS/308/-06-07
> >
> >
> > table2
> > phyto_no
> > PCKS/33857/-06-07
> > PCKS/33858/-06-07
> > PCKS/790/06-07
> > PCKS/1381/06-07
> > PCKS/1487/06-07
> > PCKS/2032/06-07
> > PCKS/306/-06-07
> > PCKS/308/-06-07
> > PCKS/01/790/06-07
> > PCKS/01/1381/06-07
> > PCKS/01/1487/06-07
> > PCKS/01/2032/06-07
> > etc...
> >
> > I have problem in matching charcter strings. i use the following select query
> >
> > SELECT * from table1,table2 WHERE UPPER(table1.phyto_cert) = UPPER(table2.phyto_cert) INTO CURSOR cst
> >
> > Result are as follows:
> >
> > PCKS/790/06-07
> > PCKS/1381/06-07
> > PCKS/1487/06-07
> > PCKS/2032/06-07
> >
> > while other phyto nos are missings.i think there is a problem in converting strings with characters like /,-,: etc.
> >
> > plz help me!
> >
> > naveed
>
> When you need to get the results from both tables you need to KOIN them, not to filter them. Try this:
>
> SELECT table1.*;
> from table1
> INNER JOIN Table2 ON UPPER(table1.phyto_cert) = UPPER(table2.phyto_cert);
> INTO CURSOR cst
>
> Borislav Borissov
>
> Should read
... you need to JOIN them
If you want all records, an inner join will not do. This will only give you the records from both tables that actually have a match.
You can use a LEFT OUTER JOIN to give you all of the records from the FROM table plus all of the matching from the JOINed table. Right outer join goes the other way. Full joins give you all the records from both tables.
Ken
You shall know the truth - and the truth shall set you free. (John 8:33)