Deleting records from .dat file


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Deleting records from .dat file
# 1  
Old 04-09-2013
Deleting records from .dat file

Hi,
I need to delete one row from a .dat file.
error processing column PCT_USED in row 1053295 for datafile /exp/stats/ts_stats.dat
ORA-01722: invalid number

This is used to load records using sql loader.

Please let me know the procedure to do it.

Regards,
VN

Last edited by narayanv; 04-09-2013 at 08:55 PM..
# 2  
Old 04-09-2013
The file extension .dat conventionally means that the file is a binary file and does not meet the requirements to be classified as a text file. If that is true in this case, you'll need to either go back to the program that created the file and fix the data that was used to generate the error on that line or find (or write) a tool that can be used to determine record boundaries in the binary file and remove the offending record. If the records all contain the same number of bytes, the dd utility can be used to delete the bad record. Otherwise, you may need to write a simple (or extremely complex) C program to find the record and remove it. The complexity of the program will depend on the format of records with the binary file.
# 3  
Old 04-09-2013
deleting records from .dat file

Hi,

This file is loaded using sql loader.
There is a bad record created and i need to delete this record.

Regards,
VN
# 4  
Old 04-09-2013
Quote:
Originally Posted by narayanv
Hi,

This file is loaded using sql loader.
There is a bad record created and i need to delete this record.

Regards,
VN
We don't know the format of the text file(s) you're feeding into sqlldr or sqlload to load your database. It is up to you to find and delete the line(s) from your input file(s) that will be transformed into the bad record.

We don't have access to your schemas, your SQL*Loader control files, or the files to be loaded so there isn't much we can do to help.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to use 'ls' command to list files like *.dat, not *.*.dat?

How to use 'ls' command to list files like *.dat, not *.*.dat (5 Replies)
Discussion started by: pmcginni777
5 Replies

2. Shell Programming and Scripting

Deleting the records based on the condition

Hi, Can any one help me, in deleting the records from the database table based on the following condition: script should take a configurable parameter as input. The input is nothing but “no. of years”. For example, if I enter 2 as input parameter, then the 2 year old records should get... (2 Replies)
Discussion started by: zxcjggu708
2 Replies

3. Shell Programming and Scripting

Perl : Deleting the records in the excel sheet

I have a excel sheet with contains the records as below.. also uploaded the input excelsheet and the output excel sheet(expected output). 322mpls32.net.xyz.comBW: 44.0 M Hrly Avg (IN /... (1 Reply)
Discussion started by: giridhar276
1 Replies

4. Shell Programming and Scripting

Deleting duplicate records from file 1 if records from file 2 match

I have 2 files "File 1" is delimited by ";" and "File 2" is delimited by "|". File 1 below (3 record shown): Doc1;03/01/2012;New York;6 Main Street;Mr. Smith 1;Mr. Jones Doc2;03/01/2012;Syracuse;876 Broadway;John Davis;Barbara Lull Doc3;03/01/2012;Buffalo;779 Old Windy Road;Charles... (2 Replies)
Discussion started by: vestport
2 Replies

5. UNIX for Dummies Questions & Answers

Grep specific records from a file of records that are separated by an empty line

Hi everyone. I am a newbie to Linux stuff. I have this kind of problem which couldn't solve alone. I have a text file with records separated by empty lines like this: ID: 20 Name: X Age: 19 ID: 21 Name: Z ID: 22 Email: xxx@yahoo.com Name: Y Age: 19 I want to grep records that... (4 Replies)
Discussion started by: Atrisa
4 Replies

6. Shell Programming and Scripting

Deleting Duplicate Records

Hello, I'm have a file of xy data with over 1000 records. I want to delete both x and y values for any record that has the same x value as any previous record thus removing the duplicates from my file. Can anyone help? Thanks, Dan (3 Replies)
Discussion started by: DFr0st
3 Replies

7. Shell Programming and Scripting

Deleting last records of a file

can you please give shell script for daleting the last 7 records of file... (7 Replies)
Discussion started by: vsairam
7 Replies

8. Shell Programming and Scripting

deleting multiple records from a huge file at one time

I have a very big file of 5gb size and there are about 50 million records in there. I have to delete the records based on recrord number that I know fromoutside with out opening the file. The record numbers are very random like 5000678, 7890005 etc. Can somebody let me know how i can... (5 Replies)
Discussion started by: dsravan
5 Replies

9. Shell Programming and Scripting

Count No of Records in File without counting Header and Trailer Records

I have a flat file and need to count no of records in the file less the header and the trailer record. I would appreciate any and all asistance Thanks Hadi Lalani (2 Replies)
Discussion started by: guiguy
2 Replies

10. UNIX for Dummies Questions & Answers

deleting records with a missing field

I had to delete rows when a record was missing a field. My solution was cut -c 202-402 ${dataFile} | awk '{if (substr($0,103,30) !~ /^ *$/) print $0} >> ${workFile} The cut is because they came two records to a row. Anyone want to offer a more elegant solution? (2 Replies)
Discussion started by: gillbates
2 Replies
Login or Register to Ask a Question