String comparision query - Urgent

Results 1 to 3 of 3

Thread: String comparision query - Urgent

  1. #1
    Join Date
    Dec 1969

    Default String comparision query - Urgent

    Hi All,<BR> Requirement:<BR> I&#039;ve got two arrays(multidimensional). I have got a number, say 4. I have to pick out records from these arrays, based on, if any 4 consecutive characters occur both on the name in array 1 and array 2. (The name is a field in both arrays).<BR>I hope you are getting it. <BR> It&#039;s actually character search(substring search). What I&#039;m<BR>doing currently is,<BR> For each record in Array A<BR> For each record in Array B<BR> For each set of character in name in Array A<BR> If instr(character set, name in Array B)<BR> Then copy record from Array A to Array C<BR> copy record from Array B to Array D<BR> End If<BR> Next<BR> Next<BR> Next<BR><BR>This is taking very long time, when there are thousands of records in these arrays. Can anybody tell me how I could optimize<BR>this, or if any other method is available to do the same in less<BR>time. In current method, it is taking some 30 minutes in normal<BR>usage. Kindly help.<BR><BR>Thanks in advance.

  2. #2
    Join Date
    Dec 1969

    Default I assume (hehe)..

    .. that they arrays are being built from database calls.<BR><BR>If this is the only thing that you are using the arrays for, why not try to make the SQL statement do the filtering for you?<BR><BR>-Doug

  3. #3
    Join Date
    Dec 1969

    Default Europeans are smarter than Americans


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts