Hi,
We have a batch working for a long time, which uses one database (db1). Now we want to connect to another db (db2), in the calling .p program I properly deployed it. My problem is that the compiler doesn't indicate any problem, when in certain cases the table names are referred without the db name (both databases contain the same table names). I'm talking about a .i code. For example:
FOR EACH table1 no-lock
WHERE ...:
IF indres then nbrphy = nbrphy + 1.
ELSE DO:
if not_avai_compte = false
then do :
FIND FIRST table2
WHERE ...
no-lock no-error.
...
end.
END.
END.
In the above example the "ambiguous table" error message is displayed in case of table2 only, though table1 can be found in both databases as well. Can anyone explain why this difference (and how it will be decided in case of table1, which db will be referred to)?
Thanks,
Peter
We have a batch working for a long time, which uses one database (db1). Now we want to connect to another db (db2), in the calling .p program I properly deployed it. My problem is that the compiler doesn't indicate any problem, when in certain cases the table names are referred without the db name (both databases contain the same table names). I'm talking about a .i code. For example:
FOR EACH table1 no-lock
WHERE ...:
IF indres then nbrphy = nbrphy + 1.
ELSE DO:
if not_avai_compte = false
then do :
FIND FIRST table2
WHERE ...
no-lock no-error.
...
end.
END.
END.
In the above example the "ambiguous table" error message is displayed in case of table2 only, though table1 can be found in both databases as well. Can anyone explain why this difference (and how it will be decided in case of table1, which db will be referred to)?
Thanks,
Peter