May be in FB4.0 :)
Regards,
Karol Bieniaszewski
----- Reply message -----
Od: "Mark Rotteveel" <m...@lawinegevaar.nl>
Do: "For discussion among Firebird Developers"
<firebird-devel@lists.sourceforge.net>
Temat: [Firebird-devel] Subquery more then 1 field
Data: sob., lis 16, 2013 15:47
On 16-11-2013 12:52, liviuslivius wrote:
> Hi,
> many times i need to return more then one field from subquery
> but this is not possible and then i must do some join and group by or
> write stored proc or other trick like concat fields by "||"
> My question is "Is this because of SQL standard or this is not simple to
> develop?"
The SQL Standard allows for it:
<query specification> ::=
SELECT [ <set quantifier> ] <select list> <table expression>
<select list> ::=
....
| <select sublist> [ { <comma> <select sublist> }... ]
<select sublist> ::=
<derived column>
....
<derived column> ::=
<value expression> [ <as clause> ]
<value expression> ::=
....
| <row value expression>
<row value expression> ::=
....
| <explicit row value constructor>
<explicit row value constructor> ::=
....
| <row subquery>
<row subquery> ::=
<subquery>
<subquery> ::=
<left paren> <query expression> <right paren>
<query expression> ::=
[ <with clause> ] <query expression body>
[ <order by clause> ] [ <result offset clause> ] [ <fetch first clause> ]
<query expression body> ::=
<query term>
....
<query term> ::=
<query primary>
<query primary> ::=
<simple table>
....
<simple table> ::=
<query specification>
....
And <query specification> is already defined at the top.
Row value constructors would be very nice to have, but the full breadth
of features this allows (including things like (field1, field2) = (1,
2), or (2, 3) < (3,4)) will probably take a lot of work.
Personally I'd like to have this, but then I'd also like to have table
value constructors :)
Mark
--
Mark Rotteveel
------------------------------------------------------------------------------
DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at
https://lists.sourceforge.net/lists/listinfo/firebird-devel
------------------------------------------------------------------------------
DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at
https://lists.sourceforge.net/lists/listinfo/firebird-devel