Subject | Re: [firebird-support] Bug in creating View |
---|---|
Author | Daniel Rail |
Post date | 2005-05-16T10:41:09Z |
Hi,
At May 16, 2005, 07:17, buppcpp wrote:
create view v_test
as
SELECT id, qty FROM test1
UNION ALL
SELECT id, CAST((qty * -1) AS INTEGER) FROM test2; <--causes error
Firebird 2.0. So, it's probable that it's no longer an issue in FB
2.0.
--
Best regards,
Daniel Rail
Senior Software Developer
ACCRA Consultants Inc. (www.accra.ca)
ACCRA Med Software Inc. (www.filopto.com)
At May 16, 2005, 07:17, buppcpp wrote:
> Views will report an error, "Data Type Unknown" if you combineTry:
> multiple statements and do some math on one of the columns.
> See the example below.
> create table test1 (id varchar(10), qty integer);
> create table test2 (id varchar(10), qty integer);
> commit;
> insert into test1 (id, qty) VALUES('1', 20);
> insert into test2 (id, qty) VALUES('1', 30);
> commit;
> create view v_test
> as
> SELECT id, qty FROM test1
> UNION ALL
> SELECT id, qty * -1 FROM test2; <--causes error
create view v_test
as
SELECT id, qty FROM test1
UNION ALL
SELECT id, CAST((qty * -1) AS INTEGER) FROM test2; <--causes error
> If this is a bug, how would it get placed in the Firebird bug list?There has been some improvements done in relation to UNIONs in
Firebird 2.0. So, it's probable that it's no longer an issue in FB
2.0.
--
Best regards,
Daniel Rail
Senior Software Developer
ACCRA Consultants Inc. (www.accra.ca)
ACCRA Med Software Inc. (www.filopto.com)