Friday, March 23, 2012

Query

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
kalyanHi,
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@.microsoft.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
>

No comments:

Post a Comment