Results 1 to 5 of 5

Thread: Transfer of data between two SQL tables - Not failing on PK violations

  1. #1
    DVNC Guest

    Transfer of data between two SQL tables - Not failing on PK violations


    Hello,

    I am transferring data from one SQL table to another. The first table has a PK on the unique id only, the second table has PK on five fields (the idea being to reject duplicate records etc. etc.). I am using a DTS package to do this, but when run it will fail when it hits a PK violation. How do I getround this??????? What simple thing am i missing??

    TIA DVNC

  2. #2
    Scott Whigham Guest

    Transfer of data between two SQL tables - Not failing on PK violations (reply)

    I will start with an obvious question (sorry) - what is violating the constraint? Is it a NULL value attempted to inert into a field involved in the PK? Or a duplicate key? Either of these will bomb your package. When you run the package it will tell you what bombed and you can look and see where and why. Try this and, if I have it wrong and you want to somehow get around the constraints, post a reply.

    Good Luck

    Scott

    http://www.gulfsouthconsulting.com/sqlserver



    ------------
    DVNC at 1/5/01 5:21:26 AM


    Hello,

    I am transferring data from one SQL table to another. The first table has a PK on the unique id only, the second table has PK on five fields (the idea being to reject duplicate records etc. etc.). I am using a DTS package to do this, but when run it will fail when it hits a PK violation. How do I getround this??????? What simple thing am i missing??

    TIA DVNC

  3. #3
    DVNC Guest

    Transfer of data between two SQL tables - Not failing on PK violations (reply)

    Scott,

    It bombs out on a PK violation.


    ------------
    Scott Whigham at 1/5/01 8:07:45 AM

    I will start with an obvious question (sorry) - what is violating the constraint? Is it a NULL value attempted to inert into a field involved in the PK? Or a duplicate key? Either of these will bomb your package. When you run the package it will tell you what bombed and you can look and see where and why. Try this and, if I have it wrong and you want to somehow get around the constraints, post a reply.

    Good Luck

    Scott

    http://www.gulfsouthconsulting.com/sqlserver



    ------------
    DVNC at 1/5/01 5:21:26 AM


    Hello,

    I am transferring data from one SQL table to another. The first table has a PK on the unique id only, the second table has PK on five fields (the idea being to reject duplicate records etc. etc.). I am using a DTS package to do this, but when run it will fail when it hits a PK violation. How do I getround this??????? What simple thing am i missing??

    TIA DVNC

  4. #4
    Scott Whigham Guest

    Transfer of data between two SQL tables - Not failing on PK violations (reply)

    OK - as I stated in the previous reply, it tells you what the violation is. If you can read the violation (Error trying to insert duplicate key, Error trying to insert NULL value into a PK field, etc) then you can begin to troubleshoot at that level but until you know why the constraint is giving you trouble, there are too many choices.

    Good Luck

    Scott

    http://www.gulfsouthconsulting.com/sqlserver



    ------------
    DVNC at 1/5/01 9:20:21 AM

    Scott,

    It bombs out on a PK violation.


    ------------
    Scott Whigham at 1/5/01 8:07:45 AM

    I will start with an obvious question (sorry) - what is violating the constraint? Is it a NULL value attempted to inert into a field involved in the PK? Or a duplicate key? Either of these will bomb your package. When you run the package it will tell you what bombed and you can look and see where and why. Try this and, if I have it wrong and you want to somehow get around the constraints, post a reply.

    Good Luck

    Scott

    http://www.gulfsouthconsulting.com/sqlserver



    ------------
    DVNC at 1/5/01 5:21:26 AM


    Hello,

    I am transferring data from one SQL table to another. The first table has a PK on the unique id only, the second table has PK on five fields (the idea being to reject duplicate records etc. etc.). I am using a DTS package to do this, but when run it will fail when it hits a PK violation. How do I getround this??????? What simple thing am i missing??

    TIA DVNC

  5. #5
    The original DvnC Guest

    Transfer of data between two SQL tables - Not failing on PK violations (reply)

    Hey DVNC,

    I think we've got a problem here. You see, I have the address dvnc@hotmail.com that you're using here.
    I get notices whenever someone replies to your post. Please stop using my email address. Thanks.

    DvnC

    ------------
    DVNC at 1/5/01 5:21:26 AM


    Hello,

    I am transferring data from one SQL table to another. The first table has a PK on the unique id only, the second table has PK on five fields (the idea being to reject duplicate records etc. etc.). I am using a DTS package to do this, but when run it will fail when it hits a PK violation. How do I getround this??????? What simple thing am i missing??

    TIA DVNC

Posting Permissions

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