Subject Re: Parent-Child queries.
Author mcnamara_gio
--- In firebird-support@yahoogroups.com, Thomas Steinmaurer <ts@...>
wrote:
>
> > I have table which has parent-child relationships between rows. How
> > can I write a query (stored procedure) that given a parent id selects
> > all childs?
> >
> > Firebird server 2.1
>
> With 2.1 even easier. Lookup recursive CTE in the Release notes. You
> don't need a recursive stored procedure anymore.
>
>
> --
> Best Regards,
> Thomas Steinmaurer
> LogManager Series - Logging/Auditing Suites supporting
> InterBase, Firebird, Advantage Database, MS SQL Server and
> NexusDB V2
> Upscene Productions
> http://www.upscene.com
> My blog:
> http://blog.upscene.com/thomas/
>
Thanks for the answer. I read about CTE and managed to write it. Can I
put my cte in stored procedure? How will the procedure look like? I am
new to firebird so I am not very familiat with it.