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

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Site Related Forums
 Article Discussion
 About Joins
 Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

krjaga
Starting Member

United Kingdom
3 Posts

Posted - 03/15/2005 :  12:15:21  Show Profile
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

Sweden
3279 Posts

Posted - 03/15/2005 :  14:25:57  Show Profile
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

USA
38200 Posts

Posted - 03/15/2005 :  14:33:41  Show Profile  Visit tkizer's Homepage
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

USA
38200 Posts

Posted - 03/15/2005 :  14:35:11  Show Profile  Visit tkizer's Homepage
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
  Previous Topic Topic Next Topic  
 Topic Locked
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000