define variables

Discussion in 'ASP General' started by atse, Oct 30, 2003.

  1. atse

    atse Guest

    Hi,
    I want to make a dynamic comparison in order to find out all the duplicates
    in the table. Becuse the data is not so tidy, and sometime the strings have
    a little difference but still a duplicate, I don't compare with this field.
    In this case, I have to select those fields that don't have so much
    confusion.

    In short, I have a table containing field1, field2 ... fieldn :' "n" is a
    variable
    I want to make a comparison to next record by the fields selected, NOT all.

    For example:

    if fileld1 is selected then
    Ffield1 = rs("fileld")
    end if

    if fileld2 is selected then
    Ffield2 = rs("fileld2")
    end if
    ....
    if fileldn is selected then
    Ffieldn = rs("fileldn")
    end if

    'when the recordset move next

    if fileld1 is selected then
    Sfield1 = rs("fileld1")
    end if

    if fileld2 is selected then
    Sfield2 = rs("fileld2")
    end if
    ....
    if fileldn is selected then
    Sfieldn = rs("fileldn")
    end if

    ' now do comparison

    if Ffield1 = Sfield1 and Ffield2 = Sfield2 and ... Ffieldn = Sfieldn then
    ' also get rid of those unseleted fields in above statement.
    'if field4 is not selected, then no Sfield4 defined, and no value.

    'do whatever I want here.

    This may not be a good solution, but I don't have a better one. Can anyone
    provide me a share idea? Or let me know how to figure out the problem above.
    Thanks a lot.

    Atse
    atse, Oct 30, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    3
    Views:
    2,656
    David Carlisle
    Apr 20, 2005
  2. theotyflos
    Replies:
    3
    Views:
    454
    Thomas Matthews
    Feb 19, 2004
  3. robin liu
    Replies:
    3
    Views:
    813
    Robin Liu
    Apr 21, 2006
  4. Replies:
    9
    Views:
    931
  5. Brian Takita

    #define _ and #define __

    Brian Takita, Jan 23, 2006, in forum: Ruby
    Replies:
    0
    Views:
    447
    Brian Takita
    Jan 23, 2006
Loading...

Share This Page