Re: I can't believe this is a bug
Posted in 2003
If you qualify the column name properly with <table>.<column> it'll produce
the right results ... what's probably happening is that the column name
exists in one of the tables in the outer query and the optimizer cannot
distinguish it and treats it as an expression for the inner table ...that's
why its always a good practice to qualify the column names with table name
in the front.
Thanx much,
Rajib Sarkar
Advisory Software Engineer (RAS)
IBM Data Management Group
Ph : (602)-217-2100
Fax: (602)-217-2100
T/L : 667-2100
As long as you derive inner help and comfort from anything, keep it --
Mahatma Gandhi
"rkusenet"
<rkusenet@sympati To: informix-list@iiug.org
co.ca> cc:
Sent by: Subject: I can't believe this is a bug
owner-informix-li
st@iiug.org
08/14/2003 12:49
PM
Please respond to
"rkusenet"
IDS 9.21.UC4 on Solaris 2.6
Look at this code:-
select pnr_locator
from ftravel_tr4@ifmx_flx:pnr_info
where pnr_locator not in
(select pnr from rpt_table where dep_date > TODAY-331)
and pnr_locator not in
(select pnr_locator from pnr_status where pnrstat = 'A')
^^^^^^^^^^^
this is a typo. There is no such field pnr_locator in the table
pnr_status. The correct column name is pnr.
But the query runs fine without returing any rows. It took me
hours to find it out. Once I corrected the column name, the
query started running fine.
The above was tested in dbaccess.
Is this a bug. Sounds too lame. This is basic sql parsing which is
failing.
ravi
sending to informix-list