Avatar of ZURINET
ZURINET asked on

insert from double select

HI all
I have table Z with :
columns A:B:C:D:E:F, of which i need to populate

Inside a store procedure I have

2 select query

select from Table a : column a1, a2,a3

select form Table b; column , b1, b2,b3

what I need to do is
insert into Table Z
values = select Table a, and Table b

How can I accomplishes this?

Note I need to do this inside the store procedure

Thanks in Advance
Microsoft SQL Server

Avatar of undefined
Last Comment
Guy Hengel [angelIII / a3]

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Guy Hengel [angelIII / a3]

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
ASKER
ZURINET

Hi
Table a and table b has no relation what soever

:-)
Guy Hengel [angelIII / a3]

could you then explain with sample data?
I mean, you have 6 columns to insert, but the 2 tables seem to return only 3 columns each?

anyhow, I must assume you want the UNION ALL construct, but I will await the clarifications before posting any code.
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck