CTE Aliases
------------
Key: CORE-4693
URL: http://tracker.firebirdsql.org/browse/CORE-4693
Project: Firebird Core
Issue Type: Bug
Affects Versions: 3.0 Beta 2
Environment: Windows 7
Reporter: Pavel Zholnerovich
Dont Work
WITH RECURSIVE
group_tree AS (
SELECT id, parent, name, CAST('' AS VARCHAR(255)) AS indent
FROM gd_goodgroup
WHERE parent IS NULL
UNION ALL
SELECT g.id, g.parent, g.name, h.indent || rpad('', 2)
FROM gd_goodgroup g JOIN group_tree h
ON g.parent = h.id
)
SELECT
gt.indent || gt.name
FROM
group_tree gt
Dynamic SQL Error.
SQL error code = -206.
Column unknown.
H.ID.
At line 16, column 14.
and so works
WITH RECURSIVE
group_tree AS (
SELECT id, parent, name, CAST('' AS VARCHAR(255)) AS indent
FROM gd_goodgroup
WHERE parent IS NULL
UNION ALL
SELECT g.id, g.parent, g.name, group_tree.indent || rpad('', 2)
FROM gd_goodgroup g JOIN group_tree
ON g.parent = group_tree.id
)
SELECT
gt.indent || gt.name
FROM
group_tree gt
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at
https://lists.sourceforge.net/lists/listinfo/firebird-devel