Page 1 of 1

compare

Posted: 14 Oct 2010 07:52
by santhosh
Hi ghost critical problem for me.can u help me

file1.csv
GJR10101315511000145,22093165,96734353,250,GJR,UER
HPR10101318071200662,57298772,03289112,250,HPR,DLR
HPR10101317581100059,57651616,02894754,250,HPR,DLR
HRR10101318031000352,02190237,03963371,250,HRR,DLR
HRR10101322141200125,02191868,03426983,250,HRR,DLR
HRR10101318071100028,02192292,77203779,250,HRR,BHR
KOR10101317231000008,04090878,14635365,250,KOR,WBR
KOR10101315171200004,04798063,14367284,250,KOR,WBR
KOR10101316291200024,13996348,97000215,250,KOR,BHR

file2.csv
KOR10101315511000150,57457784,250
GJR10101315511000145,96734353,250
UER10101315511000150,66734353,200
HRR10101315511000151,96734353,206
UER10101315511000164,96734353,200
UER10101319451200169,96734353,250
GJR10101315511000145,96734353,206
........
.n numbers.....
.......
GHR10101315511000150,36646466,200
HPR10101318071200662,03289112,250
HPR10101318071200662,03289112,206
DLR10101318071200664,03289112,206

OUTPUT:
FILE3.CSV
UER10101315511000164,96734353,200
DLR10101318071200664,03289112,206

Let me explain..
now i have to get column 1 removing first three character in file1.csv Eg:-like(10101315511000145) and add that 6th column to it like(UER10101315511000145).Now from 145 i have to increament+1 till 999 to it and compare column1 from file2 whichever number appears first it should display that line from file2.csv....so here i get UER10101315511000150 but 2nd colum doesnt matches to 3rd column in file1..so i have to go for next increament which matches that too.

thanks in advance

Re: compare

Posted: 14 Oct 2010 08:25
by ghostmachine4
i can do it for you, but the problem is, that's really your job, not mine. At least show me what you have done so far.

Re: compare

Posted: 14 Oct 2010 10:24
by santhosh
yes ghost ur right...as i am newbie i tried my level best........i will show u wat i done

Re: compare

Posted: 15 Oct 2010 00:51
by santhosh
sorry ghost ...
u help me ..blank line is coming for me. :cry:

Re: compare

Posted: 18 Oct 2010 07:16
by santhosh
hi ghost solve it plz :|

Re: compare

Posted: 18 Oct 2010 07:59
by ghostmachine4
show us what you have done and where you are stuck.