|
Posted by Sean Anderson on 04/13/07 18:36
"Sean Anderson" <sean@nospam-fullingdale.com> wrote in message
news:6UPTh.56$537.9@newsfe5-win.ntli.net...
> Can anyone see a problem here?
>
> UPDATE POSTAGE SET EXTRA_KG = ITEM_TOTAL_WEIGHT - 8
> WHERE ITEM_TOTAL_WEIGHT > 8
> AND PURCHASE_ORDER_ID = 1;
>
> I get the following error
>
> You have an error in your SQL syntax; check the manual that corresponds to
> your MySQL server version for the right syntax to use near '- 8 WHERE
> ITEM_TOTAL_WEIGHT > 8 AND PURCHASE_ORDER_ID = 1' at line 1
>
> From the following table
>
> create table POSTAGE
>
> (
>
> postage_id int NOT NULL AUTO_INCREMENT,
>
> purchase_order_id int,
>
> package_type_id int,
>
> item_total_cost decimal(10,2),
>
> item_total_weight float,
>
> package_max_weight float,
>
> extra_kg float default 0,
>
> primary key (postage_id)
>
> );
>
>
> With columns values (in order) of 1,1,1,3.49,0.75,16,0
>
>
>
> --
>
> Regards,
>
> Sean Anderson
>
Got it ... it was a triviality from a cut/paste from a Word document, where
Word had turned the "-" into one of those other, longer dashes.
Navigation:
[Reply to this message]
|