Adjust SQL query to DB2
Posted
by Guy Roth
on Stack Overflow
See other posts from Stack Overflow
or by Guy Roth
Published on 2010-03-24T16:01:53Z
Indexed on
2010/03/24
16:03 UTC
Read the original article
Hit count: 394
Part of a complex query that our app is running contains the lines: ...(inner query)
SELECT
...
NULL as column_A,
NULL as column_B,
...
FROM
...
This syntax of creating columns with null values is not allowed in DB2 altough it is totally OK in MSSQL and Oracle DBs.
Technically I can change it to:
'' as column_A,
'' as column_B,
But this doesn't have exactly the same meaning and can damage our calculation results.
How can I create columns with null values in DB2 using other syntax??
© Stack Overflow or respective owner