I tried a query like the one above in SQL Server and it gave me an error that said: Incorrect syntax near ','.

Is there a way to do this in SQL Server? Or will I have to resort to doing multiple insert statements?

Roelf

03-14-2007, 11:24 PM

What you can do is faking a subselect. In MSSQL, you can do a multiple insert by:

INSERT INTO thetable (field1, field2)
SELECT field1, field2 FROM table2
But this won't work for your situation, because it is new data. What you can do now is enter the data after the SELECT statement, as it came from another table. There you stray away from standard SQL, but in MSSQL it will work. It looks like this: