Subject Re: [firebird-support] Re: [Firebird-devel] derived tables with a join
Author Richard Wesley
On Jan 14, 2007, at 00:24, Vlad Horsun wrote:

>> Shouldn't this work with the new derived tables feature?
>>
>> select n.*
>> , c.nome
>> from new_procedure ( :par1, :par2 ) n
>> join ( select c1.nome
>> from clifor c1
>> where c1.codigo = n.field_a ) c
>> order by c.nome
>>
>> I'm getting an error on the order by clause.
>
> You missed the JOIN condition

Specifically, I think you want

select n.*
, c.nome
from new_procedure ( :par1, :par2 ) n
INNER join ( select c1.nome
from clifor c1
) c ON c1.codigo = n.field_a
order by c.nome

________________________________________________________
Richard Wesley Senior Software Developer Tableau
Software
Visit: http://www.trytableau.com/now.html