How can I define a null column value for a view?
I need to create a view using UNION ALL, but i need to set some columns
as null.
It's possible? how?
I think also it's necessary to "cast" the value...
for example. . i have..
CREATE VIEW XYS AS
SELECT
'1' AS ROWTYPE,
CUSTOMER,
STRINGVALUE,
DATEVALUE
FROM X
UNION ALL
SELECT
'2' AS ROWTYPE,
CUSTOMER,
'' AS STRINGVALUE,
DATE('1970-01-01') AS DATEVALUE
FROM Y
and so on...
but i want the STRINGVALUE and DATEVALUE from Y are null value!!
I'm using db2, but the best solution is to have a generic syntax
Thank You to all
Robert