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
 Site Related Forums
 Article Discussion
 About Joins

Author  Topic 

krjaga
Starting Member

3 Posts

Posted - 2005-03-15 : 12:15:21
Hi,

I am having two Tables. In Which i have to join these tables.
In fact if we join the tables, the result set from two table which are matching will be concatenated in a single row.

But, here i need two get results in a separate rows..is it possible ???

Ex :
Table 1:

Id Name
1 Jack
2 Philip

Table 2 :

Id Address
1 London
2 Glascow

Result will be :(joining by id)

1 Jack London
2 Philip Glascow

But i need the Answer as

1 Jack
2 Philip
1 London
2 Glascow...

U can say that we can easily do this by Union..but i need to join with a condition.

Please Help.

Thanks & Regards,
Jagadhees





rockmoose
SQL Natt Alfen

3279 Posts

Posted - 2005-03-15 : 14:25:57
Please tell us why You HAVE to do this with a JOIN and not a UNION ???

rockmoose
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2005-03-15 : 14:33:41
You can not use a JOIN to produce this result set. Who is giving you this requirement? Your teacher?

Tara
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2005-03-15 : 14:35:11
And do not post your question more than once:

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=47115

Tara
Go to Top of Page
   

- Advertisement -