title: Insert into multiple selects
body: <p>I need to insert the values of these selects into a table.
  They return many rows and for each row I need to insert a column into a new table.</p>
  
  <p>Ex:</p>
  
  <pre><code>select (select id from X where name=Contacts.Company) as IDClient, 
  FirstName + right(' '+ cast(LastName as varchar(20)), 20) as NewName, 
  (select id from Y where newid=8 and description=Contacts.JobTitle) as IDRole, 
  Initials
  from Contacts
  </code></pre>
  
  <p>And I need to do something like this for each row of this select:</p>
  
  <pre><code>insert into TableX (IDClient,NewName,IDRole,'0','0','0',Initials,'XXX',GETDATE(),NULL,NULL)
  </code></pre>
  
  <p>Ty</p>
  
  <p><strong>EDITED</strong></p>
  
  <pre><code>insert into TableX (IDClient,NewName,IDRole,'0','0','0',Initials,'XXX',GETDATE(),NULL,NULL)
  select 
  (select id from X where nAme=Contacts.Company) as IDClient, 
  FirstName + right(' '+ cast(LastName as varchar(20)), 20) as NewName, 
  (select id from Y where newid=8 and description=Contacts.JobTitle) as IDRole,
  Initials
  from Contacts
  </code></pre>
  
  <p>When i execute this I'm getting this error:</p>
  
  <p>"Incorrect syntax near '0'."</p>