Issue Details (XML | Word | Printable)

Key: CORE-1402
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Dmitry Yemanov
Reporter: Emil Totev
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Firebird Core

CREATE VIEW without column list when UNION is used

Created: 03/Aug/07 03:04 AM   Updated: Wednesday 07:38 PM
Component/s: Engine
Affects Version/s: 2.1 Beta 1
Fix Version/s: 2.5 Beta 2

Issue Links:
Relate

QA Status: Done successfully


 Description  « Hide
Column list should not be required when creating views based on UNION statements.
Column names should be the same as when the SELECT query is run outside the view.

"The column identifiers of the output set are those specified in the first SELECT specification.
If you would like to use alternative column names, column aliasing can be used in the
output list of the first SELECT specification"


 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Dmitry Yemanov added a comment - 27/Apr/09 11:38 PM
Test cases:

recreate view V1 as
select d.rdb$relation_id from rdb$database d
union all
select d.rdb$relation_id from rdb$database d

recreate view V2 as
select d.rdb$relation_id as q from rdb$database d
union all
select d.rdb$relation_id as w from rdb$database d

recreate view V3 as
select a from (select 1 a from rdb$database)
union all
select b from (select 1 b from rdb$database)

recreate view V4 as
select a as a1 from (select 1 a from rdb$database)
union all
select b as b1 from (select 1 b from rdb$database)