Home » SQL & PL/SQL » SQL & PL/SQL » Preserving Blanks in External Table (Oracle 12, Windows NT)
Preserving Blanks in External Table [message #650918] Fri, 06 May 2016 09:32 Go to next message
pstanand
Messages: 133
Registered: February 2005
Location: Chennai,India
Senior Member
Hi,
I have created external table script to read my pipe delimited text file.
In my data sometimes the material_group column can with empty space(not NULL).
After read the file and when selects the table it shows NULL for material_group column even it is having empty space.
Because "missing field values are null" I have mentioned.
How to keep the blanks as blank.

will the following help to preserve the NULL.

MATERIAL_GROUP CHAR(25) NULLIF (MATERIAL_GROUP=BLANKS))

Please let me know.

Thanks.

pstanand.
Re: Preserving Blanks in External Table [message #650919 is a reply to message #650918] Fri, 06 May 2016 09:51 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Quote:
will the following help to preserve the NULL.


No it does the opposite, just read it.

Re: Preserving Blanks in External Table [message #650933 is a reply to message #650918] Sat, 07 May 2016 08:12 Go to previous message
EdStevens
Messages: 1376
Registered: September 2013
Senior Member
pstanand wrote on Fri, 06 May 2016 09:32
Hi,
I have created external table script to read my pipe delimited text file.
In my data sometimes the material_group column can with empty space(not NULL).
After read the file and when selects the table it shows NULL for material_group column even it is having empty space.
Because "missing field values are null" I have mentioned.
How to keep the blanks as blank.

will the following help to preserve the NULL.

MATERIAL_GROUP CHAR(25) NULLIF (MATERIAL_GROUP=BLANKS))

Please let me know.

Thanks.

pstanand.


What do you think the NULLIF does? If it's not self-evident, Check the documentation.
Previous Topic: Sort PL/SQL Table
Next Topic: Index is not used when additing one more selection criteria
Goto Forum:
  


Current Time: Thu Mar 28 11:15:38 CDT 2024