Comparing two files to get only records to be inserted and updated
Hello all,
Please help me for a script that compares two files and reads only those records that are to be inserted and updated.
File1:
File2:
I want to create a file3 that would contain
I have used the command:
But somehow null records are coming to file3 which is preventing its loading in database.And the header is appended in the last line of file3.
Can anyone please help me fixing the problem.
Last edited by Don Cragun; 12-02-2013 at 05:30 AM..
Reason: Add CODE tags.
Hi,
I need to compare todays file to yesterdays file to find deletes.
I cannot use comm -23 file.old file.new.
Because each record may have a small change in it but is not really a delete.
I have two delimited files. the first field in each file is static. All other fields may change. I... (2 Replies)
Hi all,
I am new to Unix.
I have written pl/sql script to be run in Unix.
I have used Merge statement and subsequently would like to know the number of rows updated or inserted.
Any suggestions in this regard would be great
Thanks in advance
Kushal (0 Replies)
Hi there,
I am lil confused with the following issue.
I have a File, which has the following header: IMSHRATE_043008_101016
a sample detailed record is :9820101 A982005000CAVG030108000000000000010169000MAR 2008
9820102 MAR 2008 D030108
... (1 Reply)
Hi All,
I want to remove the rows from File1.csv by comparing a column/field in the File2.csv. If both columns matches then I want that row to be deleted from File1 using shell script(awk). Here is an example on what I need.
File1.csv:
RAJAK,ACTIVE,1
VIJAY,ACTIVE,2
TAHA,ACTIVE,3... (6 Replies)
Hello all;
I have been really frustrated with finding the correct perl code (and MySql statements) to accomplish what I thought was straight forward...I have tested I don't know how many different codes\suggestions I found on the net without any success...but anyhow let me explain my plight and... (0 Replies)
If third column contains null value then it should delete the row and i want to know the files which contains null value in 3rd column.Below code is not showing the updated files correctly..not sure what the issue is.plz help me
#!/usr/bin/sh
Scripts=/ushhquest/data001/Scripts
cd... (5 Replies)
hi..
my requirement is following:
i want to have a shell script that queries a table i.e. fcm_auth in database fcmcore (I use db2) to get no of rows present for a given combination eg org and logo for past 5-10 mins interval. You can take some values of org(numerical values) and corresponding... (2 Replies)
Hi Folks,
I have below files in one directory:
Spiross-MBP:AIRTEMP spirospap$ ls -1
CPK2004001
CPK2004002
CPK2004003
etc...
JFK2003001
JFK2003002
JFK2003003
etc...
TEB1999001
TEB1999002
TEB1999003
etc...
Month/year is in Filename and also in the file Header, first line. (18 Replies)
I have two files:
File_1:
@M04961:22:000000000-B5VGJ:1:1101:9280:7106 1:N:0:86
GGCATGAAAACATACAAACCGTCTTTCCAGAAATTGTTCCAAGTATCGGCAACAGCTTTATCAATACCATGAAAAATATCAACCACACCAGAAGCAGCAT
+
GGGGGGGGGGGGGGGGGCCGGGGGF,EDFFGEDFG,@DGGCGGEGGG7DCGGGF68CGFFFGGGG@CGDGFFDFEFEFF:30CGAFFDFEFF8CAF;;8F
... (3 Replies)