Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

unloading a null field with informix 1

Status
Not open for further replies.

ejaggers

Programmer
Feb 26, 2005
148
US
unload to fname select col1,col2,col3 from table;
Gives: data1|data2|data3|

unload to fname select col1,’’,col3 from table;
Gives: data1|\ |data3|
Where the second field "\space" represents a null value.

But I want nothing in the second field. i.e: data1||data3|

Does anyone know how to do this?
 
Typed, untested:
unload to fname select col1,(select rowid from table where rowid<0),col3 from table;

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
That worked like a charm!!! Thanks PHV..
 
looks a bit stupid, but you could also do:

unload to fname select col1, nvl(NULL,NULL), col3 from table;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top