I have two SQL Server tables, and I want to insert data from one into another.
I only want two columns from table A to be inserted into table B (which has more than two columns). I want to add a bunch of null
s and 1s into the rest of table B.
I saw this answer which helped, but what if I want to, for example:
INSERT into B(name, address, foo, bar, blah)
select name, 'B'+address from table A, 1, 1, null
'B'+address is throwing the error
Conversion failed when converting the varchar value 'B' to data type int