Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

2 Recordset

Status
Not open for further replies.

prprogrammer

Programmer
Jun 25, 2004
49
PR
I need to make a report wiht 2 diferen recorset..

one recordset teka user,customer,products
and othe take user,customer,contact.

if I make a join,it's display more records than I have. because contact and products link to customer with the same field customerID..



 
hi link
first record set user,customer
and second record set user,customer

and group by user

cheers

or
create a view and add them in the views and make a selct distinct

cheers





pgtek
 
hi
A select distinct will only return 1 set per customer id
no duplicate
ex:
select distinct a.user,a.customer,a.products,b.contact
from first_table a, second_table b
where
a.user = b.user and
a.customer = b.customer

cheers






pgtek
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top