Hi
Wondering if someone else can spot the syntax error in the following
statement. "locns" is an attached database. There are four "AS" terms in
the statement, they all alias tables.
Ok, found it. It seems that an alias for an "UPDATE" table name is not
permitted. Is there a particular reason for this?
I would think it a convenience especially when using long table names
and attached databases.
John
sqlite> UPDATE locns.xxx_last_delivery AS tgt
... > SET
... > tgt.del_date = (
... > SELECT src.last_del_d
... > FROM main.updates AS src
... > WHERE src.custnum = tgt.custnum),
... > tgt.del_qty = (
... > SELECT src.last_del_q
... > FROM main.updates AS src
... > WHERE src.custnum = tgt.custnum)
... > WHERE
... > tgt.custnum = (
... > SELECT src.custnum
... > FROM main.updates AS src
... > WHERE src.last_del_d IS NOT NULL
... > AND src.last_del_d > tgt.del_date)
... > ;
Error: near "AS": syntax error
--
Regards
John McMahon
li...@jspect.fastmail.fm
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users