Subject | Parsing error for Fb 2.0 with derived tables? |
---|---|
Author | Martijn Tonies |
Post date | 2006-12-21T09:46:54Z |
Arno forwarded me this:
SELECT
dt.*
FROM
(SELECT
r.RDB$RELATION_NAME,
rf.RDB$FIELD_NAME
FROM
RDB$RELATIONS r
JOIN RDB$RELATION_FIELDS rf ON (rf.RDB$RELATION_NAME =
r.RDB$RELATION_NAME)) dt
Error:
SQL error code = -206 Column unknown R.RDB$RELATION_NAME.DB_KEY At line 4,
column 30.
This is the SQL trace:
SELECT
dt.*
, "R.RDB$RELATION_NAME".RDB$DB_KEY
FROM
(SELECT
r.RDB$RELATION_NAME,
rf.RDB$FIELD_NAME
FROM
RDB$RELATIONS r
JOIN RDB$RELATION_FIELDS rf ON (rf.RDB$RELATION_NAME =
r.RDB$RELATION_NAME)) dt
Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, NexusDB, Oracle &
MS SQL Server
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com
SELECT
dt.*
FROM
(SELECT
r.RDB$RELATION_NAME,
rf.RDB$FIELD_NAME
FROM
RDB$RELATIONS r
JOIN RDB$RELATION_FIELDS rf ON (rf.RDB$RELATION_NAME =
r.RDB$RELATION_NAME)) dt
Error:
SQL error code = -206 Column unknown R.RDB$RELATION_NAME.DB_KEY At line 4,
column 30.
This is the SQL trace:
SELECT
dt.*
, "R.RDB$RELATION_NAME".RDB$DB_KEY
FROM
(SELECT
r.RDB$RELATION_NAME,
rf.RDB$FIELD_NAME
FROM
RDB$RELATIONS r
JOIN RDB$RELATION_FIELDS rf ON (rf.RDB$RELATION_NAME =
r.RDB$RELATION_NAME)) dt
Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, NexusDB, Oracle &
MS SQL Server
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com