Take out the second set statement.

<CFQUERY name="change" datasource="printprices">
Update bookinfo
SET     percentage = '#form.percentage#',
         'discountedprice' = 'price'
</cfquery>

There probably should be a 'WHERE' clause in there too, as well as u should
be using cfqueryparam.  Look it up in a book for the syntax, etc

At 10:23 AM 3/30/2004, Robert Orlini wrote:
>I have a query in an action page where I set a column to 0 (from a form)
>and update discountedprice to the same value as price. Here is the code:
>
><CFQUERY name="change" datasource="printprices">
>Update bookinfo
>SET percentage = '#form.percentage#'
>SET 'discountedprice' = 'price'
></cfquery>
>
>I'm kinda a newy to all this so of course it doesn't work. I get an error
>with -- SET 'discountedprice' = 'price'
>
>Any ideas please? Thanks.
>
>Robert O.
>HWW
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to