Oracle Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesOracle Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 25th, 2004, 04:57 AM
ushaiyer ushaiyer is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Posts: 2 ushaiyer User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Exclamation SQL LOADER-check for null

I have table

t(col1, col2,col3)

col2 may or may not contain values....based on which i have to insert.if i give an extra tabspace(if its null) in dat file col3
value gets inserted in col2.
how do i do it.My control file looks like

load data
infile x.dat
replace
into table t

fields terminated by X'9' optionally enclosed by '"' trailing nullcols
(col1 decimal external,
col2 char,
col3 decimal external)
i cant use filler.what r the the other options...

thanks in advance

Last edited by ushaiyer : October 25th, 2004 at 06:08 AM. Reason: URGENT

Reply With Quote
  #2  
Old October 25th, 2004, 06:09 AM
herlenrosa herlenrosa is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Location: India
Posts: 22 herlenrosa User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 53 m 46 sec
Reputation Power: 0
try this

load data
infile x.dat
replace
into table t (field1 POSITION(a:b), POSITION(c:d),....)

bye

Quote:
Originally Posted by ushaiyer
I have table

t(col1, col2,col3)

col2 may or may not contain values....based on which i have to insert.if i give an extra tabspace(if its null) in dat file col3
value gets inserted in col2.
how do i do it.My control file looks like

load data
infile x.dat
replace
into table t

fields terminated by X'9' optionally enclosed by '"' trailing nullcols
(col1 decimal external,
col2 char,
col3 decimal external)
i cant use filler.what r the the other options...

thanks in advance

Reply With Quote
  #3  
Old October 25th, 2004, 06:11 AM
herlenrosa herlenrosa is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Location: India
Posts: 22 herlenrosa User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 53 m 46 sec
Reputation Power: 0
load data
infile x.dat
replace
into table t (field1 POSITION(a:b),field2 POSITION(c:d)....)

Quote:
Originally Posted by ushaiyer
I have table

t(col1, col2,col3)

col2 may or may not contain values....based on which i have to insert.if i give an extra tabspace(if its null) in dat file col3
value gets inserted in col2.
how do i do it.My control file looks like

load data
infile x.dat
replace
into table t

fields terminated by X'9' optionally enclosed by '"' trailing nullcols
(col1 decimal external,
col2 char,
col3 decimal external)
i cant use filler.what r the the other options...

thanks in advance

Reply With Quote
  #4  
Old October 25th, 2004, 06:43 AM
ushaiyer ushaiyer is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Posts: 2 ushaiyer User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Sql Loader

thank you...

but then i can't use position(a:b) as my .dat is of variable length.....

i am new to sql loader....

could u plz guide me reg this?

Reply With Quote
  #5  
Old October 26th, 2004, 12:28 AM
herlenrosa herlenrosa is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Location: India
Posts: 22 herlenrosa User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 53 m 46 sec
Reputation Power: 0
Quote:
Originally Posted by herlenrosa
load data
infile x.dat
replace
into table t (field1 POSITION(a:b),field2 POSITION(c:d)....)



This link may help
http://zuse.esnig.cifom.ch/database/doc_oracle/Oracle901_Linux/server.901/a90192/ch10.htm

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesOracle Development > SQL LOADER-check for null


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT