Results 1 to 3 of 3

Thread: Finding a duplicate transaction number

  1. #1
    Chris Hanlon Guest

    Finding a duplicate transaction number

    I have a problem with a 3rd party piece of software. Doesn't matter which, really. The problem lies
    in a table called payments, with a column called txnumber...the newest version of this software fails
    a check during installation with the message "duplicate txnumber in payment table." Not sure how
    this could have happened, since there is no way to manually assign the txnumber, but the point is
    not important. What I'd like to do is figure out a sql script that will return only the duplicate number(s)
    so that I can either remove or change them manually. Unfortunately, I'm not terribly familiar with sql.

    Any suggestions?

  2. #2
    patrick fediere Guest

    Finding a duplicate transaction number (reply)

    You could do something like that
    select Count(*), txnumber from TheTableContaining_txnumber group by txnumber having count(*) >1
    You will get a list of the txnumber key present more than 1 time (and how much).
    Good hunt.
    Patrixk
    On 1/16/99 9:54:04 AM, Chris Hanlon wrote:
    > I have a problem with a 3rd party piece of software. Doesn't matter
    > which, really. The problem lies
    in a table called payments, with a column
    > called txnumber...the newest version of this software fails
    a check
    > during installation with the message "duplicate txnumber in payment
    > table." Not sure how
    this could have happened, since there is no way
    > to manually assign the txnumber, but the point is
    not important. What
    > I'd like to do is figure out a sql script that will return only the
    > duplicate number(s)
    so that I can either remove or change them manually.
    > Unfortunately, I'm not terribly familiar with sql.

    Any suggestions?

  3. #3
    Shashu Habtu Guest

    I believe I put in the wrong SQL statement. Use group by instead of order by. "Select txnumber


    On 1/16/99 9:54:04 AM, Chris Hanlon wrote:
    > I have a problem with a 3rd party piece of software. Doesn't matter
    > which, really. The problem lies
    in a table called payments, with a column
    > called txnumber...the newest version of this software fails
    a check
    > during installation with the message "duplicate txnumber in payment
    > table." Not sure how
    this could have happened, since there is no way
    > to manually assign the txnumber, but the point is
    not important. What
    > I'd like to do is figure out a sql script that will return only the
    > duplicate number(s)
    so that I can either remove or change them manually.
    > Unfortunately, I'm not terribly familiar with sql.

    Any suggestions?

Posting Permissions

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