ScoobyNet.com - Subaru Enthusiast Forum

ScoobyNet.com - Subaru Enthusiast Forum (https://www.scoobynet.com/)
-   Computer & Technology Related (https://www.scoobynet.com/computer-and-technology-related-34/)
-   -   ORACLE SQL HELP REQ'D - DISPLAY NULL VALUES AS TEXT FOR ALL COLUMNS (https://www.scoobynet.com/computer-and-technology-related-34/705800-oracle-sql-help-reqd-display-null-values-as-text-for-all-columns.html)

L33_WRX 12 August 2008 03:37 PM

ORACLE SQL HELP REQ'D - DISPLAY NULL VALUES AS TEXT FOR ALL COLUMNS
 
I want to display all NULL values on each column within the table as text 'NULL' instead of being blank. How can I do this, tried case statement but must be easier way...

Cheers


select *
from xior_w_142_cfr_accounts
where XIOR_PROCESS_DATE is null
or XIOR_SOC_SEQNO is null
or XIOR_ACCOUNT_NO is null
or XIOR_SUBACC_NO is null
or XIOR_BOE_TRUE_CAPITAL_BALANCE is null
or XIOR_ACTUAL_ADVANCE is null
or XIOR_INCEPTION_DATE is null
or XIOR_MATURITY_DATE is null
or XIOR_CURR_INTR_RATE is null
or XIOR_CURR_INTR_RATE_TYPE_CODE is null
or XIOR_CURR_INTR_RATE_CAP_RATE is null
or XIOR_CURR_INTR_RATE_FLOOR_RATE is null
or XIOR_CURR_INTR_RATE_REV_DATE is null
or XIOR_CURR_INTR_TERM_BAND_INDEX is null
or XIOR_FINL_INTR_RATE is null
or XIOR_FINL_INTR_RATE_TYPE_CODE is null
or XIOR_FINL_INTR_RATE_CAP_RATE is null
or XIOR_FINL_INTR_RATE_FLOOR_RATE is null
or XIOR_FINL_INTR_TERM_BAND_INDEX is null
or XIOR_LOAN_PURPOSE is null
or XIOR_ORIGINAL_TERM is null
or XIOR_REPAYMENT_METHOD is null
or XIOR_MORTGAGE_CLASS is null
or XIOR_FLEXIBLE_LOAN_MARKER is null
or XIOR_PROVISIONAL_FLAG is null

DJ Dunk 12 August 2008 03:51 PM

select NVL(XIOR_PROCESS_DATE, 'null')
from xior_w_142_cfr_accounts
where XIOR_PROCESS_DATE is null


. . . would do it, but you'd need to specify each column in the select statement.

L33_WRX 12 August 2008 04:46 PM

Cheers - done that but forgot the quotes on null - doh! been writing this stuff to long today - need to get home!

DJ Dunk 12 August 2008 04:53 PM

I start to glaze over after a few hours :D


All times are GMT +1. The time now is 10:17 PM.


© 2024 MH Sub I, LLC dba Internet Brands