Subject | Re: [firebird-support] Re: [Firebird-devel] derived tables with a join |
---|---|
Author | Richard Wesley |
Post date | 2007-01-16T17:19:47Z |
On Jan 14, 2007, at 00:24, Vlad Horsun wrote:
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
>> Shouldn't this work with the new derived tables feature?Specifically, I think you want
>>
>> 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
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