Home » RDBMS Server » Server Utilities » SQL Loading : Constant NULL clause
SQL Loading : Constant NULL clause [message #71710] Thu, 26 December 2002 02:12 Go to next message
Deborrah
Messages: 8
Registered: July 2002
Junior Member
Hi,
What is the way to insert a default of NULL
into a NUMBER Columns?

The table is with fields a(varchar2), b(varchar2)
and c(NUMBER).

The following works:
-----------------------
(
a ,
b ,
c constant 0
)
-----------------------

whereas the following does not:
-----------------------
(
a ,
b ,
c constant NULL
)
-----------------------

How can I introduce a NULL automatically during
sql*loader?

TIA
Debby
Re: SQL Loading : Constant NULL clause [message #71713 is a reply to message #71710] Thu, 26 December 2002 06:59 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10708
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
use
INTO TABLE my_table     
FIELDS TERMINATED BY ","     
TRAILING NULLCOLS     
(
a,
b,
c nullif c = "(null)"
)

Re: SQL Loading : Constant NULL clause [message #71715 is a reply to message #71713] Thu, 26 December 2002 07:13 Go to previous message
Deborrah
Messages: 8
Registered: July 2002
Junior Member
Thanks Mahesh,
But I have already got the solution. I used the
following instead:
...
b,
c "NULL"
)

;-)
Debby
Previous Topic: error 1053 in starting the database service of oracle !
Next Topic: Why disorder?
Goto Forum:
  


Current Time: Mon Dec 23 17:55:44 CST 2024