Posted: Tue Oct 26, 2004 7:47 am Post subject: HIGH/LOW VALUES in DB@ unload
Hi
i am new to DB2.
when a DB2 table is unloaded,the columns (type char/numeric/date) having NULL
values generally show up as LOW-VALUES in the sequential unload file.
i have a table with a column with NULL having dEFAULT set to 'Y' with no
DEFAULTVALUE.what will be the content of this field in the unloaded file?
Will it have LOW-VALUES?
For what type of values can we get HIGH VALUES and LOW VALUES in the sequential unload file?
Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
Posted: Tue Oct 26, 2004 9:44 am Post subject:
john316,
A null value is a special indicator that represents the absence of a value. The value can be absent because it is unknown, not yet supplied, or nonexistent. The DBMS treats the null value as an actual value, not as a zero value, a blank, or an empty string. A Column defined as INTEGER, CHAR , DATE all have low-values when unloading if they null values
When you unload these values you will low-values and additional byte to indicate that the column contains a null value ( check the syspunch dataset).
You can use scalar functions like COALESCE or VALUE functions to populate a default value when the column contains null.
check this link which explains in detail about COALESCE
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum