Subject Error report: SP return and as
Author emel.hu
FB 1.5.1

When I exequte this SQL command, the result is OK:

select A.*,
(select BBBBData from GET_From_BBBB(A.ID1, A.ID2)) as Bdata
from AAAA A

I see Bdata column too in the result dataset;)

-------------------------------------------

When I add an order tag, I get an error message:

select A.*,
(select BBBBData from GET_From_BBBB(A.ID1, A.ID2)) as Bdata
from AAAA A
order by Bdata

>>>

Dynamic SQL Error
SQL error code = -206
Column unknown
Bdata

-------------------------------------------

Is it an error or I do something wrong?

When I get data from BBBB table (against GET_From_BBBB sp) the return
column good.

eMeL