Subject Re: [firebird-support] Weird Error While Creating a View ...
Author Martijn Tonies
Hi,

> This is a View definition I am trying to compile:
>
> CREATE VIEW VU_SOME_VIEW (FIELD1, FIELD2)
> AS
> SELECT F1, 0 FROM TABLE1

Because "0" doesn't have an underlying defined datatype, you
have to tell Firebird what type it is:

SELECT F1, CAST(0 AS INTEGER) FROM TABLE1

> UNION
> SELECT F2, 2 FROM TABLE2

SELECT F2, CAST(2 AS INTEGER) FROM TABLE2

Etc...


With regards,

Martijn Tonies
Database Workbench - the developer tool for InterBase & Firebird
Upscene Productions
http://www.upscene.com