Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Insert Using a Select

Author  Topic 

momobn
Starting Member

1 Post

Posted - 2009-03-25 : 19:47:31
I want to insert a constant along with data I get from a select containing a join...

Insert into TABLEa
Country,
City,
State,
Id

Select 'US', Select(City, State, Id from TABLEb inner join TABLEc where *condition)


But the number of items in my select doesn't match the number of items I am inserting?

RickD
Slow But Sure Yak Herding Master

3608 Posts

Posted - 2009-03-26 : 05:07:19
Select 'US', City, State, Id from TABLEb inner join TABLEc where *condition
Go to Top of Page
   

- Advertisement -