Re: A very simple SQL question.
Posted in 1997
Constantino Cremidis wrote:
> Although I have been using SQL for some years I do not remember
> getting this this SQL error. Can someone explain me why this is an
> error.
>
> SELECT a.col1, a.col1, a.col3 FROM table1 a, table2 b
> WHERE ^^^^^^
> a.col1 = b.col1 AND
> table1.col4 = "SOME_VALUE"
> ^^^^^^>
> Fails with error 522 Table (table1) not selected in query.
>
> PS. Sorry if this is too obvious but I am just curious.
Obviously, that last line needed to be:
a1.col4 = "SOME_VALUE"
Why this is an error? Looks more like a tiny glitch in the parser to
me. If I were Informix, I would probably not put a high priority on
fixing it because it looks inconsistent and would encourage unclear SQL
(which is normally clear at first glance |:^).
Just my $0.02 (US)
--
-- Jake (Never yelled "CROWDED THEATER!" during a fire)
+------------------------------------------------------------+
| The expedient performance of a task with excessive concern |
| regarding its duration-to-completion engenders a virtual |
| certainty of diminished benefit therefrom. |
| -- Benjamin Franklin (but he said it in 3 words) |
+------------------------------------------------------------+