Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Join Problem

Author  Topic 

rajesha
Starting Member

36 Posts

Posted - 2003-07-24 : 02:54:25
i have 2 tables Table_main and Table_details

Table_main contains only distinct records,For each record in this table there will be so many

records in Table_details (one - many relation ship).
i want to write a query which gives only that much records in Table_main but with corresponding

records in Table_details (appended or in some other way)

I tried with joins but same records in Table_main is repeating for each distinct record in

Table_details.

How can i solve this.Pl help me.

Andraax
Aged Yak Warrior

790 Posts

Posted - 2003-07-24 : 04:22:04
Hi!

Could you give us an example of what the result should look like?

Go to Top of Page

rajesha
Starting Member

36 Posts

Posted - 2003-07-24 : 04:35:07
Eg.
Table_main
sno no
1 12313
2 98894

Table_details
Sno Item date
1 TV 3/1/03
1 Fridge 3/1/03
2 Car 3/3/01
2 Tape 4/4/01



i want result like
Sno no item1 date1 item2 date2
1 12313 TV 3/1/03 Fridge 3/1/03
2 98894 Car 3/3/01 Tape 4/4/01

Thanks



Go to Top of Page
   

- Advertisement -