Subject Re: [IBO] Error with stored procedure on TIBOQUERY "Can not SELECT RDB$DB_KEY"
Author Svein Erling
> I changed the property to readonly but did not work.
> Below is the ddl and the query.
> Thanks.
>
> Query with error on TiboQuery:
> select
> Mylist.paramkey,
> Mylist.paramname
> from
> p_list Mylist

You're right, it doesn't work - I could even reproduce it running the query through DB Workbench (3.4.2 Pro). Admittedly, I've never tried aliasing a stored procedure when there's no join involved, and adding a join makes the alias work:

select Mylist.paramkey, Mylist.paramname
from p_list Mylist
join rdb$database rdb on (1=1)

I don't know why, though I do think aliases are less important for queries not involving joins.

Sorry,
Set