Re: unloading trailing spaces
Posted in 2000
If this is being done on a UNIX system (or a Windows system with MKS toolkit) there are far too many native text processing functions available for this to be worthwhile in Informix. I'd suggest a simple awk or sed script. This sounds too much like using a bulldozer to empty the cat's litter box. carlos Danail Cvetanov Danailov wrote: > >"Dan, Rebecca, Cody Djuric" wrote: > >> > >> Informix gurus: > >> > >> I am trying to modify a text file by loading the file into an informix > >> database, performing updates in SQL through reference tables, and > >> unloading to an un-delimited text file. The problem I am running into > >> is that the trailing spaces (which I want included in the unload) are > >> only unloading 50% of the time. I am using a char[24] field type. Can > >> anyone please offer any suggestions on how to get the trailing spaces to > >> unload 100% of the time. > >> > >> Thanks > >> -Dan > > > >Hello Dan, > > > >if You are working on a UNIX-Machine the is an easy way. > >Use a char(25) field and put a character, You don't use > >in Your text on place 25 (e.g. "@"). > > > >Back on unix-shell You can do a > >"cat orgfile | tr -d @ > newfile", > >which will wipe off the "@". > > > >Wolfgang > > Hi! > > Use a VARCHAR(24) field, Informix save trailing spaces for VARCHAR type when > unloading. > > Best regards, > Danail. -- ------------------------------------------------------------------------------- Carlos Benjamin, Jr. (623) 869 - 2364 Programmer/Analyst/Consultant Currently Assigned to Central Arizona Project mailto:inf999@cap-az.com -------------------------------------------------------------------------------