Thanks all. Too many cut-and-pastes and I didn't pay attention. Also, still am a newbie on some of this.


Robert O.

-----Original Message-----
From: Doug James [mailto:[EMAIL PROTECTED]
Sent: Friday, July 09, 2004 9:26 AM
To: CF-Talk
Subject: Re: SOT: keyword 'Where' error

Yes, you cannot specify a where clause in an insert. If you are updating
a row then use update not insert.

Doug

Robert Orlini wrote:

>Is there a problem with this Insert? I get an "Incorrect syntax near the keyword 'Where'" error. I added single quotes around #cnumber#
>and still get the error.
>
><CFQUERY name="additem" datasource="purchaseorders">
>INSERT INTO itemsordered
>(cnumber,
>line,
>qty,
>item,
>priceeach,
>totalprice
>)
>VALUES (#cnumber#,
>'#line#',
>'#qty#',
><cfqueryparam value="#Trim(item)#" cfsqltype="CF_SQL_VARCHAR">,
>'#trim(item)#',
>'#trim(totalprice)#'
>)
>Where cnumber = #cnumber#
></cfquery>
>
>Robert O.
>HWW
>
>
  _____
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to