Subject | RE: [firebird-support] WITH RECURSIVE or not WITH RECURSIVE |
---|---|
Author | Omacht András |
Post date | 2018-05-30T14:04:09Z |
Hi Gábor!
Now I can only test on 2.5.8, and it works:
ID PARENT_ID
7
8 7
9 7
10 7
11 7
12 7
András
-----Original Message-----
From: firebird-support@yahoogroups.com [mailto:firebird-support@yahoogroups.com]
Sent: Wednesday, May 30, 2018 2:42 PM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] WITH RECURSIVE or not WITH RECURSIVE
2018. 05. 29. 19:08 keltezéssel, Omacht András aomacht@... [firebird-support] írta:
I got "multiple rows in singleton select multiple rows in singleton select" (yes, double) error message with my real data. It's easy to reproduce just execute the next script for additional test data.
INSERT INTO TABLE1 (ID, PARENT_ID) VALUES (7, NULL); INSERT INTO TABLE1 (ID, PARENT_ID) VALUES (8, 7); INSERT INTO TABLE1 (ID, PARENT_ID) VALUES (9, 8); INSERT INTO TABLE1 (ID, PARENT_ID) VALUES (10, 7); INSERT INTO TABLE1 (ID, PARENT_ID) VALUES (11, 10); INSERT INTO TABLE1 (ID, PARENT_ID) VALUES (12, 7);
Gabor
------------------------------------
------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Visit http://www.firebirdsql.org and click the Documentation item on the main (top) menu. Try FAQ and other links from the left-side menu there.
Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
------------------------------------
Yahoo Groups Links
__________ Information from ESET Mail Security, version of virus signature database 17470 (20180530) __________
The message was checked by ESET Mail Security.
http://www.eset.com
__________ Information from ESET Mail Security, version of virus signature database 17470 (20180530) __________
The message was checked by ESET Mail Security.
http://www.eset.com
Now I can only test on 2.5.8, and it works:
ID PARENT_ID
7
8 7
9 7
10 7
11 7
12 7
András
-----Original Message-----
From: firebird-support@yahoogroups.com [mailto:firebird-support@yahoogroups.com]
Sent: Wednesday, May 30, 2018 2:42 PM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] WITH RECURSIVE or not WITH RECURSIVE
2018. 05. 29. 19:08 keltezéssel, Omacht András aomacht@... [firebird-support] írta:
> Hi Gabor!First of all, thank you very much! But...
>
> You can do it with recursive cte:
I got "multiple rows in singleton select multiple rows in singleton select" (yes, double) error message with my real data. It's easy to reproduce just execute the next script for additional test data.
INSERT INTO TABLE1 (ID, PARENT_ID) VALUES (7, NULL); INSERT INTO TABLE1 (ID, PARENT_ID) VALUES (8, 7); INSERT INTO TABLE1 (ID, PARENT_ID) VALUES (9, 8); INSERT INTO TABLE1 (ID, PARENT_ID) VALUES (10, 7); INSERT INTO TABLE1 (ID, PARENT_ID) VALUES (11, 10); INSERT INTO TABLE1 (ID, PARENT_ID) VALUES (12, 7);
Gabor
------------------------------------
------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Visit http://www.firebirdsql.org and click the Documentation item on the main (top) menu. Try FAQ and other links from the left-side menu there.
Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
------------------------------------
Yahoo Groups Links
__________ Information from ESET Mail Security, version of virus signature database 17470 (20180530) __________
The message was checked by ESET Mail Security.
http://www.eset.com
__________ Information from ESET Mail Security, version of virus signature database 17470 (20180530) __________
The message was checked by ESET Mail Security.
http://www.eset.com