Re: Spaces loaded as nulls
Date: 1995/05/31
Message-ID: <250_at_along.dialix.oz.au>#1/1
In article <3q321n$nqb_at_hasle.oslonett.no>, Erlend Flaa (erlend_at_oslonett.no) writes:
>andrewv_at_devvax.mincom.oz.au (A. Vellnagel - Advanced Technical
>Services - MINCOM) wrote:
>> "When loading from an ACSII file to Oracle, 'spaces' in the ACSII file
>>get translated to 'nulls' in the Oracle data set. The guys here have written
>>an SQL script that goes through the file converting all the nulls back to
>>spaces. Is there a switch or something that can be set so that the spaces are
>>in fact loaded as spaces."
>> I'm not sure what these guyss are using to do the loads (ie. what
>>utility, cobol program, c program .......). They are running Oracle 7 on an
>>OpenVMS box. Any thoughts?
>> Thanks in Advance,
>> Andrew Vellnagel.
>>
>
>In my experience SPACE does not automatically transforms itself into
>NULL. I suggest you check out the load utility they are using.
>
>But, if they are inserting new records in the database, what about
>adding defaults to the columns in question?
>
>alter table <mytable> modify <mycolumn> default ' '.
>
>It may be worth a try :-). Erlend
>--------------------------------------------------------------
>Erlend Flaa Email: erlend_at_oslonett.no
>Uniba Data AS, Colbjornsens gt.2,N-0256 OSLO, NORWAY
>Telephone: +47 2256 2650 Telefax: +47 2255 6850
>
>All standard disclaimers apply, I think, probably...yes!
Have you had a look at the CHAR data_type in V7? It has vhanged with the new version. CHAR is now a fixed length record type, and the remaining cpace between the column's declared width and the is padded with spaces (ASCII 32).
Cheers,
Alex Long
-- , \ / , / \ )\__/( / \ / \ (_\ /_) / \ ______________________/_____\__\_at_ @/___/_____\________________ |paladin.along.dialix.oz.au | |Alex Long | |Adelaide, South Australia | |_______________________________________________________________| |Billy, in one of his nice new sashes, | |Fell in the fire and was burnt to ashes; | |Now, although the rom grows chilly, | |I haven't the heart to poke poor Billy. Harry Graham. | +_______________________________________________________________+ | /\ / \\ \ /\ | | / V )) V \ | |/ ` // ' \| ` V ' _Received on Wed May 31 1995 - 00:00:00 CEST