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
 General SQL Server Forums
 New to SQL Server Programming
 Select Query

Author  Topic 

atiqraza
Starting Member

11 Posts

Posted - 2007-02-06 : 13:36:35

I have three tables with the exact same structure and colums.
Is it possible to select from all these three tables in one query without using a UNION.

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-02-06 : 13:44:08
Why don't you want to use a UNION? It just doesn't make sense.

I suppose you could use a JOIN if you've got data in common in the tables.

Tara Kizer
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2007-02-06 : 13:45:41
You should really finish with one thread beffore starting another one about the same thing

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

Again, what are you trying to accomplish?



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

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page

atiqraza
Starting Member

11 Posts

Posted - 2007-02-06 : 13:47:09
The reason i dont want to use a union is because all three files have 10 million rows each and are close to 2Gigabytes in size. A union is causing it to be really slow.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-02-06 : 13:47:10
Based upon that other thread, I wouldn't bother with a JOIN either.

Stop what you are doing! Stop the insanity!

Tara Kizer
Go to Top of Page
   

- Advertisement -