![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Martin, I think this query should actually be disallowed - it's a bug, similar at least to one we know about. The query works fine if you do "union all" instead of "union", but the union in the view adds an effective "distinct" to the query, and using a sequence with distinctness values causes a problem and is usually disallowed. Would it be an acceptable workaround to use union all in this case? Robert From: info-ingres-bounces (AT) kettleriver...ting (DOT) com [mailto:info- ingres-bounces (AT) kettleriverconsulting (DOT) com] On Behalf Of Martin Bowes Sent: 24 April 2009 10:30 To: Ingres and related product discussion forum Subject: [Info-Ingres] The sequential view of a union...is this a marriagemade in hell? Hi Everyone, Me again, sorry to be a pest...I'm having a great week at the Office. Try this on Ingres2006R2 or better... 1. createdb bowtest 2. sql bowtest < setup.sql 3. sql bowtest << SQL_END \r -- Lets see whats in the view, there should be 11 rows. select a, b from fleabane_view; \p\g -- now populate the table, this should simply add the sequence counter to -- each row selected from the view. insert into test_this(a,b) select a, b from fleabane_view; \p\g -- Trouble is that it doesn't. -- It seems to have repeated one of the qualifying rows from fleabane_view -- ad nauseum rather than use each row in the view. -- It also got the wrong number of rows. (10 not 11) select * from test_this; \p\g \q SQL_END Martin Bowes _______________________________________________ Info-Ingres mailing list Info-Ingres (AT) kettleriverconsulting (DOT) com http://www.kettleriverconsulting.com...fo/info-ingres |
![]() |
| Thread Tools | |
| Display Modes | |
| |