I was wondering if anyone has previously had a similar requirement to do what I am trying to do?
I have a file (27MB to round figures in size) which contains approx 260,000 lines of variable length, colon separated fields.
It has a defined structure as follows :-
As previously mentioned these are maximums...
A snippet of the mentioned file here :-
258316:SO0003:Ysgubor-wen Ho:SO00:51:43.2:3:26.4:203500:300500:W:RH:Rho Cyn Taf:Rhondda,Cynon,Taff:X:01-MAR-1993:I:170:0:0
258327:SN7608:Ystalyfera:SN60:51:45.7:3:47.4:208500:276500:W:NP:Nth Pt Talb:Neath Port Talbot:O:01-MAR-1993:I:160:0:0
I need to search as quickly as possible, field 3, possibly sub-searched using fields 14 and/or 13....
Clearly this would be an extremely time consuming process to begin at the beginning and search to the end.... Especially if the result was to yield nothing....
To complicate matters further, the file contains characters which do not 'play well' with toupper() and tolower()
For example :-
30:NC3249:A' Chèir Ghorm:NC24:58:24.1:4:52:949500:232500:W:HL:Highld:Highland:X:23-JUN-2008:U:9:0:0
The sort order of the file is numerical on field 1 ... ie 1 - 258422, field 2 is random based on field 3 which is alphabetically sorted while all other fields are also random.
Some sort of caseless 'closest match' style search is what I need.
There is no possibility I can break down the file into 'A' 'B' 'C' on field 3 which was my first idea....
I have already spent a significant amount of time on this problem myself, and basically achieved sweet Fanny Adam! Any and all help would most graciously be received and appreciated!!
Any ideas please?
This is one 'small' problem in a MUCH larger overall project I have brewing, further details to be announced once more progress has been made!
Regards and thanks,