Results 1 to 6 of 6
  1. #1
    Join Date
    Feb 2003
    Location
    Paris
    Posts
    38

    Unanswered: compare sql queries

    Can anyone point me to code that permit a detailed comparison of sql queries?

    Many thanks.
    Cordialement

  2. #2
    Join Date
    Nov 2002
    Location
    Desk, slightly south of keyboard
    Posts
    697
    Hi Crassus,

    What are you trying to compare? The construction of the queries or performance. There are plenty of performance related docs about, but I don't know of any to compare the query construction.

    Hth
    Bill

  3. #3
    Join Date
    Feb 2003
    Location
    Paris
    Posts
    38
    Thanks, Bill.

    I'd like to compare all data in 2 recordsets on the basis of similar values in certain columns.
    Cordialement

  4. #4
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1
    Originally posted by Crassus
    Thanks, Bill.

    I'd like to compare all data in 2 recordsets on the basis of similar values in certain columns.
    Sounds like you want to try using MINUS and INTERSECT:

    SELECT c1,c2,c3 FROM A
    MINUS
    SELECT c1,c2,c3 FROM B

    ... tells you what is in A but not in B. Ditto for B not in A

    SELECT c1,c2,c3 FROM A
    INTERSECT
    SELECT c1,c2,c3 FROM B

    ... tells you what is same in A and B

  5. #5
    Join Date
    Feb 2003
    Location
    Paris
    Posts
    38
    Thanks again, Tony

    I didn't think of using MINUS/SELECT column by column.

    Are MINUS/SELECT more efficeint than WHERE clauses?
    Cordialement

  6. #6
    Join Date
    May 2003
    Posts
    87
    Yes ! Lot of folks fear that union, minus, intersect are not effecient but if you check the stats, you will know for sure.

    Originally posted by Crassus
    Thanks again, Tony

    I didn't think of using MINUS/SELECT column by column.

    Are MINUS/SELECT more efficeint than WHERE clauses?

Posting Permissions

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