how do i ignore rows with first filed NULL


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting how do i ignore rows with first filed NULL
# 1  
Old 08-18-2008
how do i ignore rows with first filed NULL

I have a file to load in the table, and am using SQLLDR
CONTROL FILE
-----------------------
LOAD DATA
INFILE 'sample.txt'
APPEND
INTO TABLE TEMP_LOAD
FIELDS TERMINATED BY '|'
TRAILING NULLCOLS
(FIELD1,FIELD2,FIELD3)

Now i have about 10,000 lines in the file
FIELD1 in the table is not null constraint ...

Now i have about 3000 lines with first field NULL in the file ...

How do i ignore those lines ? I know i can increase 'errors=10000' but that is against company policy ...

Does anyone know any condition in sqlldr?
# 2  
Old 08-19-2008
try adding WHEN FIELD1!="" in SQLLDR..
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

awk to ignore multiple rows based on a condition

All, I have a text file(Inputfile.csv) with millions of rows and 100 columns. Check the sample for 2 columns below. Key,Check A,1 A,2 A, A,4 B,0 B,1 B,2 B,3 B,4 .... million rows. My requirement is to delete all the rows corresponding to all the keys which ever has at least one... (4 Replies)
Discussion started by: ks_reddy
4 Replies

2. Shell Programming and Scripting

Verify the null filed of the text file

Here is my sample data Test.txt column 1|columne 2|columne 3|columne 4 test|test||test test|test|test| test||test|test test|test|test|test |test|test|test In that example having NULL value of the row 2-column 3,row 3-column 4,row 4 - column 2,row 6- column 1 How i can validate... (5 Replies)
Discussion started by: krish2014
5 Replies

3. Shell Programming and Scripting

awk code to ignore the first occurence unknown number of rows in a data column

Hello experts, Shown below is the 2 column sample data(there are many data columns in actual input file), Key, Data A, 1 A, 2 A, 2 A, 3 A, 1 A, 1 A, 1 I need the below output. Key, Data A, 2 A, 2 A, 3 A, 1 A, 1 A, 1 (2 Replies)
Discussion started by: ks_reddy
2 Replies

4. Shell Programming and Scripting

Insert string 'NULL' where there is a null value

I have an input file having 7 fields delimited by , eg : 1,ABC,hg,1,2,34,3 2,hj,YU,2,3,4, 3,JU,kl,4,5,7, 4,JK,KJ,3,56,4,5 The seventh field here in some lines is empty, whereas the other lines there is a value. How do I insert string NULL at this location (7th loc) for these lines where... (8 Replies)
Discussion started by: zilch
8 Replies

5. Shell Programming and Scripting

Removing rows based on a different file (ignore my earlier post - there was a mistake).

Sorry I made a mistake in my last post (output is suppose to be the opposite). Here is a revised post. Hi, I am not sure if this has already been asked (I tried the search but the search was too broad). Basically I want to remove rows based on another file. So file1 looks like this (tab... (3 Replies)
Discussion started by: kylle345
3 Replies

6. Linux

The LimitRequestBody filed in openSUSE 10.2

Because some program i have installed can not upload files bigger than some size as printing, the base got a packet bigger than 'max_allowed_packet' bytes what that i need to do as written in the documentation of the program increase the value of a fileld called LimitRequestBody told that is in... (5 Replies)
Discussion started by: tal
5 Replies

7. UNIX for Dummies Questions & Answers

The LimitRequestBody filed in openSUSE 10.2

Because some program i have installed can not upload files bigger than some size as printing, the base got a packet bigger than 'max_allowed_packet' bytes what that i need to do as written in the documentation of the program increase the value of a fileld called LimitRequestBody told that is in... (3 Replies)
Discussion started by: tal
3 Replies

8. Shell Programming and Scripting

deleting pipes in a particular filed

i have a file with some records seperated by pipe. I am getting unwanted "|" in the 7th field and i want to remove any pipes in the 7th field only. Can somebody help out? Here is the sample record. 460625192|432559595|MANU... (3 Replies)
Discussion started by: dsravan
3 Replies

9. Shell Programming and Scripting

Filed substitution with awk

guys, I'm trying to 9k lines of the following: aaa aaa 1 1 1 to aaa aaa 1 01 1 Im pretty ignorant when it comes to subtituting fields using awk any help ? Tony (1 Reply)
Discussion started by: tony3101
1 Replies
Login or Register to Ask a Question