Results 1 to 3 of 3

Thread: Arrays

  1. #1
    Rahul Guest

    Default Arrays

    I have two arrays<BR><BR>one with colnames from table <BR>other with colnames from file .<BR><BR>I have to compare the Colnames from these arrays and if the colnames do not match the Throw an Error<BR><BR>Can anyone know how to do it

  2. #2
    Join Date
    Dec 1969

    Default RE: Arrays

    loop through the arrays and compare, if all colnames in same order could do<BR>dim 1<BR>For i = 0 to ubound(arr1) &#039; assumes dimensions of arrays are the same<BR> If Ucase(arr1(i)) &#060;&#062; UCase(arr2(i)) Then <BR> &#039;some error<BR> exit for <BR> end if<BR>next<BR><BR>If not necessarily in same order could do like this<BR>dim i, j, match<BR><BR>For i = 0 to ubound(arr1)<BR> match = false<BR> for j = 0 to ubound(arr2)<BR> if ucase(arri(i)) = ucase(arr2(j)) then match = true<BR> next<BR> if not match then<BR> some error<BR> exit for<BR> end if<BR>next

  3. #3
    Rahul Guest

    Default RE: Arrays

    Thanks Frank It works

Posting Permissions

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