Re: A very simple SQL question.
Posted in 1997
Constantino Cremidis <ccremid@saadev.saa.noaa.gov> said: } 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. According to the Informix-SQL reference manual (aka TFM), in describing the FROM clause of SELECT "Once an alias is supplied, you must use the alias whenever referring to the table." HTH, randini