Table aliases on a DELETE statement
Posted in 1997
4GL 6.01.UD2
DSA 7.11.UC1
Hi family.
When I do a typical SELECT statement, I almost always use table aliases.
For example:
select y.col1, u.col2, t.col3, z.col4
from table_one y, table_two u, table_three t, table_four z
where <whatever joins & conditions are appropriate>
In an application, I am preparing a DELETE statement very much like
this:
delete from gpprgtab t where t.modname = "X" and t.progname = "Y"
I get a 201 syntax error message:
delete from gpprgtab t where t.modname = "X" and t.progname = "Y"# ^
# 201: A syntax error has occurred.
When I stop using table aliases, the error goes away. No big deal, of
course, since [under Informix] I can delete from only one table in a
single statement anyway. But is such a restiction normal? Is it
documented? (I am looking through the "Guide to SQL" as I write this.)
I will hold off removing the table aliases from the UPDATE statements
until my debugging process gets up to there also but I suspect I will
have to remove those aliases; the same reasoning applies.
A bit annoying!
Comments?
--
-- Jake (Engaged in the persuit of undomesticated aquatic avians)
+-----------------------------------------------------------+
| Impeccable Logic: A thought process which successfully |
| resists chicken bites |
+-----------------------------------------------------------+