Insert into with table and values

S

Steve

I have a need to insert into a table by pulling records from another table
AND setting one field.

My normal statement is:
Insert Into Table1 (Field1, Field2, Field3, Field4) Select Table2. Field1,
Table2.Field2, Table2.Field3, Table3.Field4 from Table2 LEFT JOIN Table3 on
Table2.Field1 = Table3.Field1 and Table2.Field3 = Table3.Field3

I need to add a discrete value as Field5 to my Table1 when this executes.
Can anyone help me out with how I add that into my statement so it does the
table draw above but adds setting Field5 in Table1 to "A" ????

thanks!
 
G

Guest

Try..

Insert Into Table1 (Field1, Field2, Field3, Field4, Field5) Select Table2.
Field1,
Table2.Field2, Table2.Field3, Table3.Field4, 'NewText' from Table2 LEFT JOIN
Table3 on
Table2.Field1 = Table3.Field1 and Table2.Field3 = Table3.Field3
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top