Re: Multiple queries into a single temp table
Posted in 1998
Jay Hannah wrote:
> Here are a couple solutions for you:
>
> 1) Use the UNION operator:
> select id as col1, dealer as col2 from dealer
> UNION -- (or UNION ALL)
> select id as col1, manufacturer as col2 from manufacturer
> into temp dlr_manu_tbl;>
> 2) Create the temporary table as a seperate step:
> create TEMP table dlr_manu_tbl (col1 int, col2 varchar(40));
> insert into dlr_manu_tbl
> select id as col1, dealer as col2 from dealer;
> insert into dlr_manu_tbl
> select id as col1, manufacturer as col2 from manufacturer;>
Could someone tell me about performance of each approach ?.
Which solution is more preferable with terrific amount of data in each select
?
SY, Alexander
--
If You want to feel OK -- INSTALL Your Windows Every Day !