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.
| Author |
Topic |
|
abacusdotcom
Posting Yak Master
133 Posts |
Posted - 2005-04-23 : 10:06:32
|
| Hi,Can I join two tables together without relations?I execute this sample code.SELECT MasterFile.FileID, BenchMarkConf.*FROM MasterFile, BenchMarkConfwhat other ways can i use?Thanks,LekanI sign for fame not for shame but all the same, I sign my name. |
|
|
TG
Master Smack Fu Yak Hacker
6065 Posts |
Posted - 2005-04-23 : 11:16:21
|
| If two tables don't have any related columns, why would you want to join them?If there is another table(s) that could act as an "association" table you could use them.Be One with the OptimizerTG |
 |
|
|
mohdowais
Sheikh of Yak Knowledge
1456 Posts |
Posted - 2005-04-24 : 06:28:46
|
| When you do a select from two tables without specifying a join condition, you are still doing a join: a CROSS JOIN. Your query would produce the same results as:SELECTMasterFile.FileID,BenchMarkConf.*FROMMasterFile CROSS JOINBenchMarkConfOf course, why you would want to do something like this is beyond me, but if you can elaborate on your business requirement, we might be able to help you find a solution.OS |
 |
|
|
JimL
SQL Slinging Yak Ranger
1537 Posts |
Posted - 2005-04-25 : 07:34:19
|
| (In my best anouncer voice)This sounds Like a job for Dr. Cross join!Ok Jeff Jump in here.JimUsers <> Logic |
 |
|
|
|
|
|