March 18, 2008 at 4:29 am
HI,
Can I make a temprary table by using union operator.
This is my query.
(SELECT SUBSCRIBER_PHONE,primary_magazine_code FROM RBI..TBL8530
WHERE SUBSCRIBER_PHONE IN(SELECT COL001 FROM RESULT))
union
(SELECT SUBSCRIBER_PHONE,primary_magazine_code FROM RBI..verified8530
WHERE SUBSCRIBER_PHONE IN(SELECT COL001 FROM RESULT))
I want to put the records in a temporary table.
Another thing is that is there intersect and minus operator like union operator in sql server 2000.
Regards
March 18, 2008 at 5:49 am
If you want it to go into a temp table, this works fine (I used Adventureworks to test it):
SELECT ContactTypeID, [Name] INTO #mytem FROM Person.ContactType
union
SELECT StateProvinceID AS CultureID, [Name] FROM Person.StateProvince
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy