1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2013
    Rep Power

    Data Comparision


    I have a table which have the following columns

    Id Member Access BossName


    Abc123 Peter Admin Dan

    Abc123 John User Marc

    Abc123 Derek Admin Abby

    Abc123 Dan User null

    I am trying to come up with the query to see who are the Member with Admin access in a spefic ID and for the members with Admin access if their BossName is part of the same ID as a user or not.

    For eg in the above as you see there are 2 members who are the Admin Peter and Derek. and Peter Boss Dan is a user as well in the same ID.

    So in this case the query should return below exception report

    Id : Abc123 Member : Derek BossNAMe : Abby

    Any suggestions if this can be done using perl?

  2. #2
  3. !~ /m$/
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    May 2004
    Reno, NV
    Rep Power
    Is the question whether this can be done in perl, because I'm sure it can.

    You can connect to a database and issue SQL queries, so yes. Is the question about whether a single SQL query do the whole job? Not sure.

    Normally I would say yes, but it doesn't look like the example is normalized data. Dan is just a name, and not an uncommon one, so I wouldn't assume the first Dan is the same as the later Admin.

    But certainly you can just select all where ID equals some group, and then perform any comparison you want in perl data structures..

IMN logo majestic logo threadwatch logo seochat tools logo