PDA

Click to See Complete Forum and Search --> : Selecting a single record


ganraj
Aug 15th, 1999, 12:58 PM
Hello!

I need help on SQL.

There are two tables. Table1 and Table2.

Table1---------------Table2

custid---------------custid,address1
---------------city,state,.....


There are multiple records exist in the table2 for a custid with different address. How do I pick only one record with all the fields.

Thanks In advance....

Ganraj.

------------------
ganraj.

[This message has been edited by ganraj (edited 08-16-1999).]

JHausmann
Aug 16th, 1999, 11:34 AM
select t2.custid, t2.field2, ... t2.fieldx
from table1 t1, table2 t2
where t1.custid = t2.custid