Home » RDBMS Server » Server Utilities » sqlloader (10g win2k3)
sqlloader [message #519199] Wed, 10 August 2011 05:25 Go to next message
bhavangowda
Messages: 23
Registered: May 2011
Location: bangalore
Junior Member
hey in one table i have some master data ok,i need to enter some more data from excel sheet, this excel sheet is having the data wic is already in the DB ,i need to skip the data
wic is in the excel and i have to append the data comparing with one column is null?
Re: sqlloader [message #519201 is a reply to message #519199] Wed, 10 August 2011 05:30 Go to previous messageGo to next message
cookiemonster
Messages: 13917
Registered: September 2008
Location: Rainy Manchester
Senior Member
wic? which has two h's.

If you have a unique key on the table sqlloader will skip an records that violate it and put them in the bad file. If you don't have a unique key I suggest you add one.

bhavangowda wrote on Wed, 10 August 2011 11:25
i have to append the data comparing with one column is null?

What does that mean exactly?
Re: sqlloader [message #519206 is a reply to message #519201] Wed, 10 August 2011 05:55 Go to previous messageGo to next message
bhavangowda
Messages: 23
Registered: May 2011
Location: bangalore
Junior Member
thank u for the reply ...If we dont have unique column then .?any other procedure that we can compare the null columns and upload the data into DB
Re: sqlloader [message #519207 is a reply to message #519206] Wed, 10 August 2011 05:57 Go to previous messageGo to next message
bhavangowda
Messages: 23
Registered: May 2011
Location: bangalore
Junior Member
we have column called charnumber in a table in some rows these column empty ...? i have to compare with this column and update
Re: sqlloader [message #519210 is a reply to message #519207] Wed, 10 August 2011 06:18 Go to previous messageGo to next message
cookiemonster
Messages: 13917
Registered: September 2008
Location: Rainy Manchester
Senior Member
Explain exactly what you are trying to do with examples.
Give the structure of the table, sample data you are trying to load and explain what you want to happen.

And write in complete words, not im speak, this is a professional forum.
Re: sqlloader [message #519212 is a reply to message #519210] Wed, 10 August 2011 06:28 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
And I should say, write an interrogation mark when there is a question, and a SINGLE point to end a sentence.
I don't understand anything of what you have and what you want and where are the questions and where are the assertions in what you post.

Regards
Michel
Re: sqlloader [message #519218 is a reply to message #519212] Wed, 10 August 2011 07:28 Go to previous messageGo to next message
bhavangowda
Messages: 23
Registered: May 2011
Location: bangalore
Junior Member
SQL> desc QM_MAS_CHARACTERISTICS
Name Null? Type
----------------------------------------- -------- ----------------------------
CHARID NOT NULL VARCHAR2(15)
MATERIALDEFINITION_ID NOT NULL VARCHAR2(10)
VENDORCODE VARCHAR2(10)
CHARTYPE NOT NULL VARCHAR2(15)
CHARDESCRIPTION VARCHAR2(40)
MIN NUMBER(13,4)
MAX NUMBER(13,4)
QACATALOGREF_ID VARCHAR2(15)
TCTYPE VARCHAR2(15)
SAMPLINGPLAN VARCHAR2(10)
NOOFBATCHES NUMBER(3)
NOOFDAYS NUMBER(3)
SORTORDER NUMBER(3)
CHARNUMBER NUMBER(4)

this master table.having some master data

Charnumber column has some null columns ---> I have update that if its null

and excel file consists of old madterdata and newly added master data

if master data already exists with charnumber with some value...i have to skip the data from upload

other if master data already exists and charanumber is null--i have to update the row

if master data not exists we have to insert the data to db from
exel file

hope you got it

excel file attached


Re: sqlloader [message #519220 is a reply to message #519218] Wed, 10 August 2011 07:33 Go to previous messageGo to next message
cookiemonster
Messages: 13917
Registered: September 2008
Location: Rainy Manchester
Senior Member
As far as I'm aware sqlloader doesn't do updates. Have a look at external tables instead.
Re: sqlloader [message #519224 is a reply to message #519218] Wed, 10 August 2011 07:50 Go to previous message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
To keep it simple,
I would load the new data into a separate table and use sql merge.
Previous Topic: Multilingual Support Parameters
Next Topic: Sql Loader value needed from another table
Goto Forum:
  


Current Time: Thu Mar 28 12:35:42 CDT 2024