Hi all,
I have this view:
CREATE VIEW MY_VIEW AS
SELECT tip AS MYVIEW_TIP, abil AS MYVIEW_ABIL
FROM table1
UNION
SELECT tip,'S'
FROM table2
I have defined columns with declared type 'CHAR' in the original tables
If I use sqlite3_column_decltype to get my declared type I get CHAR for
the first column but NULL for the latter, I think because in the last
UNION the latter column is a constant 'S', even if it is defined as a
table column reference in the first SELECT
If I change my view:
CREATE VIEW MY_VIEW AS
SELECT tip AS MYVIEW_TIP, abil AS MYVIEW_ABIL
FROM table1
UNION
SELECT tip,abil
FROM table2
using sqlite3_column_decltype returns CHAR as I want.
Is it correct that SQLite uses the last UNION to get column type, then I
have to prepare a last UNION with all column table reference to get the
correct column type?
I have several view from Oracle to convert into SQLite, have I to add a
"dummy" final UNION with a WHERE clause that returns no rows to make
SQLite works?
Thanks in advanced.
Luca
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------