Home > Archive > MS SQL Server > May 2005 > Query









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Query
Kalyan

2005-05-20, 8:23 pm

my query looks like this

select a,c,d
from aaa
where some condtion
union all
select a,c,d
from bbbb
where some condtion

how to put the result into temp. table



thanks
kalyan

Hari Prasad

2005-05-20, 8:23 pm

Hi,

Use the below query format:-


Select * into #temp1 FROM (Select i from X11 Union ALL Select i from X12) K


Thanks
Hari
SQL Server MVP

"Kalyan" <Kalyan@discussions.microsoft.com> wrote in message
news:42EA9755-D5C3-47F8-97A2- A4C1E6CBB4D1@microso
ft.com...
> my query looks like this
>
> select a,c,d
> from aaa
> where some condtion
> union all
> select a,c,d
> from bbbb
> where some condtion
>
> how to put the result into temp. table
>
>
>
> thanks
> kalyan
>



Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com