Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to remove null indicators while unloading a table

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
Priyesh Tewari

New User


Joined: 24 Jun 2008
Posts: 7
Location: Pune

PostPosted: Mon Sep 01, 2008 3:13 pm    Post subject: How to remove null indicators while unloading a table
Reply with quote

Hi,
I am trying to unload data from table using HPUNLOAD utility. But null indicator appear in that unload file. Even after using COALESCE function The null indicator appear in the file. Can somebody help me on this
Back to top
View user's profile Send private message

wfs

New User


Joined: 04 Sep 2008
Posts: 1
Location: USA

PostPosted: Fri Sep 05, 2008 10:37 pm    Post subject: Reply to: How to remove null indicators while unloading a ta
Reply with quote

are you sure it's the NULL indicator you're seeing.

If the column in question is a string, then the COALESCE(colname,'XXX')

would result in a VARCHAR output column, so it would be preceded by the LENGTH attribute.

To get rid of the length use SUBSTR

SELECT
....
SUBSTR (COALESCE(colname,' ') || space(20), 1, 10) etc
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SQL query to run through list of valu... Ni3-db2 DB2 14 Wed Dec 14, 2016 9:52 am
No new posts Syncsort - NULL in Integer field chec... nartcr SYNCSORT 4 Thu Oct 06, 2016 6:47 am
No new posts Need Rexx Program to Load in to DB2 T... Hareesh Verma CLIST & REXX 22 Tue Sep 20, 2016 2:59 pm
No new posts Command UNIQUE CONSTRAINT on any tabl... rohanthengal DB2 2 Thu Aug 18, 2016 3:48 pm
No new posts Updating online Db2 table kishpra DB2 3 Fri Aug 12, 2016 2:44 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us