Re: SQL question "Transactions"
Posted in 1999
The syntax error is due to the missing semi-colon after the begin work.
I'm assuming that this is on stores7, and by default, stores7 is not a
logging database, so you get a different error (transaction not
available). Get rid of the begin work/commit work, or modify the
database to use logging.
Vic
judah wrote:
> hi,
>
> What is the proper syntax for transactions;
>
> when I use dbaccess with the following statement I get an error
>
> BEGIN WORK
> LOCK TABLE stock;
> #^
> # 201: A syntax error has occurred.
> #
> UPDATE stock SET unit_price = unit_price * 1.10
> WHERE manu_code ='KAR'
> DELETE FROM stock WHERE description ='baseball_bat'
> INSERT INTO manufact (manu_code, manu_name, lead_time)
> VALUES ('LYM','LYMAN, 14)> COMMIT WORK
>
> what am I doing wrong (it also pukes when I use ;'s
>
> thankx
--
Vic Goldberg
Manager, DBA Team,
Acting Manager, Technical Integration
Cornell University
(607) 254-7441 (Voice) (607) 255-6982 (Fax)