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)
 Retriving data from two tables

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2005-06-01 : 08:37:33
kalyan writes "How i need to get the data from 2 different tables ?, let us say orders & employees
which don't have any common key to retrive data using Joins.
I need to get the data in a single query"

JimL
SQL Slinging Yak Ranger

1537 Posts

Posted - 2005-06-01 : 08:47:07
What is the relationship between the tables.
Please post table schema and expected results.

Jim
Users <> Logic
Go to Top of Page

jsmith8858
Dr. Cross Join

7423 Posts

Posted - 2005-06-01 : 09:41:43
kalyan -- I need to go run some errands today and also I need to make my lunch. Can you give me detailed instructions on how to accomplish these two tasks based on the information I just gave you?

- Jeff
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2005-06-01 : 09:50:22
What's missing boys?

A junction table.

There must be an OrdersEmployee Table.

Other than that, you can't do a join.



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx
Go to Top of Page
   

- Advertisement -