Re: [firebird-support] Problem returning multiple rows from a CTE-recursive procedure

2018-05-04 Thread DougC d...@moosemail.net [firebird-support]
On Fri, 04 May 2018 14:10:40 -0400 blackfalconsoftw...@outlook.com [firebird-support] firebird-support@yahoogroups.com wrote I am hoping to begin writing a technical article soon that will introduce database application developers to these idiosyncrasies who are new to Firebird,

Re: [firebird-support] Problem returning multiple rows from a CTE-recursive procedure

2018-05-04 Thread Mark Rotteveel m...@lawinegevaar.nl [firebird-support]
On 2018-05-04 20:10, blackfalconsoftw...@outlook.com [firebird-support] wrote: > I must admit that I have spent many years working with various > database engines, with SQL Server being the engine where the large > majority of my professional development had been emphasized. > Nonetheless, I have

Re: [firebird-support] Problem returning multiple rows from a CTE-recursive procedure

2018-05-04 Thread Dimitry Sibiryakov s...@ibphoenix.com [firebird-support]
04.05.2018 20:10, blackfalconsoftw...@outlook.com [firebird-support] wrote: > Nonetheless, I have worked with Oracle, Sybase, MySQL, and a little > PostgreSQL and SQLite. I can't believe that you never looked at Oracle's FOR LOOP syntax in pipelined functions which difference from Firebird

Re: [firebird-support] Problem returning multiple rows from a CTE-recursive procedure

2018-05-04 Thread blackfalconsoftw...@outlook.com [firebird-support]
Thank you, Mark, for clearing up my misunderstanding.  When I found some sample code on StackOverflow that demonstrated the use of the "FOR-DO" construct, I realized what I had misunderstood. I believe I sent you an email that suggested my correction to my understanding of this

Re: [firebird-support] Problem returning multiple rows from a CTE-recursive procedure

2018-05-04 Thread Mark Rotteveel m...@lawinegevaar.nl [firebird-support]
On 2018-05-04 18:56, blackfalconsoftw...@outlook.com [firebird-support] wrote: > I am not sure if I understand your explanation here... > > 1... > Why would I test the input parameter, "PI_KEY_IN" for each row? I am > only doing this to ensure that the client never sends an input value > of

Re: [firebird-support] Problem returning multiple rows from a CTE-recursive procedure

2018-05-04 Thread blackfalconsoftw...@outlook.com [firebird-support]
I am not sure if I understand your explanation here... 1... Why would I test the input parameter, "PI_KEY_IN" for each row? I am only doing this to ensure that the client never sends an input value of zero(0). 2... In the other email you sent you stated that... "A FOR .. DO is a loop

Re: [firebird-support] Problem returning multiple rows from a CTE-recursive procedure

2018-05-04 Thread Mark Rotteveel m...@lawinegevaar.nl [firebird-support]
On 4-5-2018 18:31, Steve Naidamast blackfalconsoftw...@outlook.com [firebird-support] wrote: > How so?  The "SUSPEND" statement is the last statement in the procedure > or are you referring to the fact that it is continued as a result of the > previous "DO" statement? A FOR .. DO is a loop

Re: [firebird-support] Problem returning multiple rows from a CTE-recursive procedure

2018-05-04 Thread Steve Naidamast blackfalconsoftw...@outlook.com [firebird-support]
support@yahoogroups.com> on behalf of Dimitry Sibiryakov s...@ibphoenix.com [firebird-support] <firebird-support@yahoogroups.com> Sent: Friday, May 4, 2018 12:25 PM To: firebird-support@yahoogroups.com Subject: Re: [firebird-support] Problem returning multiple rows from a CTE-recursive procedure 0

Re: [firebird-support] Problem returning multiple rows from a CTE-recursive procedure

2018-05-04 Thread Dimitry Sibiryakov s...@ibphoenix.com [firebird-support]
04.05.2018 18:13, Steve Naidamast blackfalconsoftw...@outlook.com [firebird-support] wrote: > If you look at my procedure below, you will note that there is only a single > "SUSPEND" > statement. If you look a little more, you'll see that it is called in a loop. -- WBR, SD.

Re: [firebird-support] Problem returning multiple rows from a CTE-recursive procedure

2018-05-04 Thread Mark Rotteveel m...@lawinegevaar.nl [firebird-support]
On 4-5-2018 18:13, Steve Naidamast blackfalconsoftw...@outlook.com [firebird-support] wrote: > However, I am not sure about the multiple "SUSPEND" statements on a > per-record basis. > > If you look at my procedure below, you will note that there is only a single > "SUSPEND" statement. Yet,

Re: [firebird-support] Problem returning multiple rows from a CTE-recursive procedure

2018-05-04 Thread Steve Naidamast blackfalconsoftw...@outlook.com [firebird-support]
id:96714d12-5078-4b55-a660-b7d6d4c1b734] From: firebird-support@yahoogroups.com <firebird-support@yahoogroups.com> on behalf of Dimitry Sibiryakov s...@ibphoenix.com [firebird-support] <firebird-support@yahoogroups.com> Sent: Thursday, May 3, 2018 5:17 P

Re: [firebird-support] Problem returning multiple rows from a CTE-recursive procedure

2018-05-03 Thread Dimitry Sibiryakov s...@ibphoenix.com [firebird-support]
03.05.2018 23:04, blackfalconsoftw...@outlook.com [firebird-support] wrote: > However, I though only the issuance one "SUSPEND" was enough to flush the > entire buffer of > all records... No. One SUSPEND - one record in result set. Two SUSPENDs - two records and so on. Watch this in

RE: [firebird-support] Problem returning multiple rows from a CTE-recursive procedure

2018-05-03 Thread blackfalconsoftw...@outlook.com [firebird-support]
András... Thank you very much for your assistance. Your suggestion seemed to work like a charm. However, I though only the issuance one "SUSPEND" was enough to flush the entire buffer of all records... Steve

RE: [firebird-support] Problem returning multiple rows from a CTE-recursive procedure

2018-05-03 Thread Omacht András aoma...@mve.hu [firebird-support]
To: firebird-support@yahoogroups.com Subject: [firebird-support] Problem returning multiple rows from a CTE-recursive procedure Hello... I have been in the process of converting my application's SQL Server T-SQL code to Firebird PSQL procedures. So far so good until I got to the one where I built

[firebird-support] Problem returning multiple rows from a CTE-recursive procedure

2018-05-03 Thread blackfalconsoftw...@outlook.com [firebird-support]
Hello... I have been in the process of converting my application's SQL Server T-SQL code to Firebird PSQL procedures. So far so good until I got to the one where I built a Firebird procedure with a recursive CTE in it. The following code is an exact match to my original SQL Server T-SQL