Subject Re: joining stored procedures results
Author kaczy27
--- In firebird-support@yahoogroups.com, "Martijn Tonies"
<m.tonies@u...> wrote:
> Hi,
>
> > I have a stroed procedure returning sets of foreignkey values
> > sp1(param1) returning id
> >
> > and another stored procdures returning greater sets of the same
> > foreignkey values enhanced with some more params
> > sp2(param2) returning id, field1, field2
> >
> > I want to
> > select *
> > from
> > sp1(param1)
> > left join sp2(param2)
> > on sp1(param1).id = sp2(param2).id
>
> I think you need to write:
>
> on SP1.ID = SP2.ID

Thank you, this is what I needed (actually if the fields are
different I can use straight join ... on id1 = id2)

and how to code such case
from
sp1(param1)
left join sp1(param2)
on sp1(param1).id = sp1(param2).id
??

CUIN Kaczy

>
> With regards,
>
> Martijn Tonies
> Database Workbench - developer tool for InterBase, Firebird, MySQL
& MS SQL
> Server.
> Upscene Productions
> http://www.upscene.com