Union Make Table Query

Wet_Blanket

Registered User.
Local time
Today, 12:42
Joined
Dec 3, 2008
Messages
113
Good Afternoon,

I have the below Union Query that I want to turn into a make table query. But I can't figure out where to put the INTO clause. No matter where I stick it, I get errors.

SELECT acct_num, br_id, fa_id, acct_pgm, acct_pgm_assn_end_dt, client_tr_dt, trade_date, trans, symbol, shares, client_price, price
FROM [nonmgd BUYS]
UNION SELECT acct_num, br_id, fa_id, acct_pgm, acct_pgm_assn_end_dt, client_tr_dt, trade_date, trans, symbol, shares, client_price, price
FROM [nonmgd ClsdBUYS]
UNION SELECT acct_num, br_id, fa_id, acct_pgm, acct_pgm_assn_end_dt, client_tr_dt, trade_date, trans, symbol, shares, client_price, price
FROM [nonmgd SELLS]
GROUP BY acct_num, br_id, fa_id, acct_pgm, acct_pgm_assn_end_dt, client_tr_dt, trade_date, trans, symbol, shares, client_price, price;
 
Good Afternoon,

I have the below Union Query that I want to turn into a make table query. But I can't figure out where to put the INTO clause. No matter where I stick it, I get errors.

SELECT acct_num, br_id, fa_id, acct_pgm, acct_pgm_assn_end_dt, client_tr_dt, trade_date, trans, symbol, shares, client_price, price
FROM [nonmgd BUYS]
UNION SELECT acct_num, br_id, fa_id, acct_pgm, acct_pgm_assn_end_dt, client_tr_dt, trade_date, trans, symbol, shares, client_price, price
FROM [nonmgd ClsdBUYS]
UNION SELECT acct_num, br_id, fa_id, acct_pgm, acct_pgm_assn_end_dt, client_tr_dt, trade_date, trans, symbol, shares, client_price, price
FROM [nonmgd SELLS]
GROUP BY acct_num, br_id, fa_id, acct_pgm, acct_pgm_assn_end_dt, client_tr_dt, trade_date, trans, symbol, shares, client_price, price;

See what happens if you add the following in front of your Union Queries, and then surrond the Union Queries with "(" and ")".
Code:
[B]Insert Into {YourTable}[/B]
[B]([/B]
[B][COLOR=green]{Union Query List From Above}[/COLOR][/B]
[B])[/B]
 
That just gives me a syntax error...
 
I think I'm approaching this all wrong. I'm just going to create a new make table query using the Union Query as its source. Much simplier.
 

Users who are viewing this thread

Back
Top Bottom