D
David H
You can't use a WHERE statement as apart of a simple INSERT INTO statement.
Think about it - an INSERT INTO statement is adding records to a table, what
is there that the WHERE can act upon?
If you are selecting records from another table and need to insert them the
syntax would be...
INSERT INTO [destination] ([field1],[field2],etc.) SELECT [field1],
[field2], etc FROM [source] WHERE [field1] = [criteria]
You just have to be careful that you have order of the fields match exactly
or you'll wind up twisting up the data and having values in the wrong fields.
Think about it - an INSERT INTO statement is adding records to a table, what
is there that the WHERE can act upon?
If you are selecting records from another table and need to insert them the
syntax would be...
INSERT INTO [destination] ([field1],[field2],etc.) SELECT [field1],
[field2], etc FROM [source] WHERE [field1] = [criteria]
You just have to be careful that you have order of the fields match exactly
or you'll wind up twisting up the data and having values in the wrong fields.