>a row then use update not insert.
>You can't have a where clause on an insert statement.
>Firstyl, you can't insert using a where clause are you wanting to do an
>UPDATE???
:)
It's late and I feel mischievous, so I will respond to these assertions. You can do inserts using a where if you select values from a table, as follows (MS SQL Server-specific, possibly other DBs also):
INSERT INTO <TABLE> (<FIELD LIST>)
SELECT <FIELD LIST FOR VALUES>
FROM <2.TABLE>
WHERE <WHERE CLAUSE>
Clearly the syntax of the original post is incorrectly using the WHERE clause, I just wanted to point out that it CAN be used in the right circumstances. In the hope it may help someone down the track! The syntax above will potentially insert multiple records based on the SELECT.
HTH
Aaron Christiansen
and the Prisoner of Micro$oft
(Can you tell I've just been to the movies?)
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

