*You may want to refer to the Posting Titled Comparing Array Elements - F1 please before reading this *
The actual requirement is to read from a comma separated text file that may contain duplicate rows.
The text file contains : EmpId,TripNumber,CtryCode
An employee may actually travel to same country-different cities in a single trip and in that situation, the text file will contain:
222,90000,US
222,90000,US
etc.
Also he may travel to different countries in a single trip. Then the text file will be like
222,900001,UK
222,900001,RU
222,900001,FR
Another possibility is that he may travel to just one country also; Then
222,900002,US
My requirement is that I should capture all these info and then to move it into tableA. BEFORE inserting into TableA, I have to check if the same info is present there (TableA)already. The comparison is based on the trip number.
ie, if the trip number is present already or not.
If it is, then I have to move those values into another table called TableAArchive; Else, simply insert into TableA.
We are not all concerned about the CtryCode or EmpId.
The whole process may appear simpler than it actually is.
Can anyone suggest a strategy for this ?
I hope this presents an interesting Design Problem for you to solve.
Meanwhile I am also trying hard to crack this.
Thanks a lot in advance.
RR.
The actual requirement is to read from a comma separated text file that may contain duplicate rows.
The text file contains : EmpId,TripNumber,CtryCode
An employee may actually travel to same country-different cities in a single trip and in that situation, the text file will contain:
222,90000,US
222,90000,US
etc.
Also he may travel to different countries in a single trip. Then the text file will be like
222,900001,UK
222,900001,RU
222,900001,FR
Another possibility is that he may travel to just one country also; Then
222,900002,US
My requirement is that I should capture all these info and then to move it into tableA. BEFORE inserting into TableA, I have to check if the same info is present there (TableA)already. The comparison is based on the trip number.
ie, if the trip number is present already or not.
If it is, then I have to move those values into another table called TableAArchive; Else, simply insert into TableA.
We are not all concerned about the CtryCode or EmpId.
The whole process may appear simpler than it actually is.
Can anyone suggest a strategy for this ?
I hope this presents an interesting Design Problem for you to solve.
Meanwhile I am also trying hard to crack this.
Thanks a lot in advance.
RR.