Re: A very simple SQL question.
Posted in 1997
Hi Tino,
Yes, I have seen this error before. Basically, since you have
supplied an alias for table1 ( a ), all references to that table
should ONLY be through that alias. When you try to reference that
table as "table1", it expects either "table1" to be an alias for
another table, or the table table1 without an alias.
I think this is Informix specific. I have worked in SYBASE and do
not remember seeing this before.
Hope this helps ( and hope the explanation does not sound too
cryptic !! )
Thanks
Sujata
______________________________ Reply Separator _________________________________
Subject: A very simple SQL question.
Author: Constantino Cremidis <ccremid@saadev.saa.noaa.gov> at internet
Date: 11/24/97 2:43 PM
Hello:
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.
Is this an ANSI or an Informix Restriction?
Tino.
PS. Sorry if this is too obvious but I am just curious.