View previous topic :: View next topic
|
Author |
Message |
Hima1985
New User
Joined: 17 Apr 2009 Posts: 70 Location: India
|
|
|
|
Hi All
I have a requirement like this, Can you please help
File 1 FB 80
Code: |
1234 10000 1
1234 20000 4
1235 25000 10
1235 30000 10
1236 15000 5
1237 15000 10
1285 (spaces)20 |
File 2 FB 80
Code: |
1234 10000 6
1235 25000 10
1235 35000 10
1236 15000 5
|
Keys here are first four bytes(1 to 4) and 18bytes (6 to 23), and need a out put some thing like this
Code: |
1234 10000 1 6
1234 20000 4 0
1235 25000 10 10
1235 30000 10 10
1236 15000 5 5
1237 15000 10 0
1285 (spaces)20 0 |
which means file is having a record 1234 10000 where its count in this file is 1 and file2 having a record 1234 10000 where its count is 6 so i need oput 1234 10000 1 6 (1 is from file1 and 6 is from file2 for same record)
there wont be dublicates and both the files will be in sorted order
There could be record which is there in file1 but not in file 2 |
|
Back to top |
|
|
Lijo
New User
Joined: 24 Aug 2008 Posts: 41 Location: Cochin
|
|
|
|
I tried understanding your output data. But this one didn't make sense to me. Is this correct?
should this be 1235 30000 10 0???
Also,
Quote: |
Keys here are first four bytes(1 to 4) and 18bytes (6 to 23), |
18bytes for secondary Keys, But in your example I couldn't recognize this 18 bytes. Are you looking for a match on 6 to 6 bytes? |
|
Back to top |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1193 Location: Dublin, Ireland
|
|
|
|
Also, do you mean to drop the 3rd record from File2 - 1235 35000 10 ?
Garry. |
|
Back to top |
|
|
|