Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Importing data?? [modified]

Importing data?? [modified]

Scheduled Pinned Locked Moved Database
questioncomdesignhelp
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Muammar
    wrote on last edited by
    #1

    Hi, I have a problem and I'm not even sure what question to ask.. I suspect my problem lays in the design, I have these three identical sets of table that are filled independently and when combined at some time to have them in one table we will have the primary key (ID is a primary key in all the table copies) violated (where set to bold) Please, how would you do it D'Oh!

    ID IDD Name


    1 1 A
    2 1 B
    3 1 C
    1 2 A
    2 2 B
    3 2 C

    ID IDD Name


    1 1 A
    2 1 B
    3 1 C

    ID IDD Name


    1 2 A
    2 2 B
    3 2 C


    We will either find a way, or make one!   (\ /)   (- .-) C(''')(''')

    modified on Friday, October 23, 2009 4:53 PM

    N 1 Reply Last reply
    0
    • M Muammar

      Hi, I have a problem and I'm not even sure what question to ask.. I suspect my problem lays in the design, I have these three identical sets of table that are filled independently and when combined at some time to have them in one table we will have the primary key (ID is a primary key in all the table copies) violated (where set to bold) Please, how would you do it D'Oh!

      ID IDD Name


      1 1 A
      2 1 B
      3 1 C
      1 2 A
      2 2 B
      3 2 C

      ID IDD Name


      1 1 A
      2 1 B
      3 1 C

      ID IDD Name


      1 2 A
      2 2 B
      3 2 C


      We will either find a way, or make one!   (\ /)   (- .-) C(''')(''')

      modified on Friday, October 23, 2009 4:53 PM

      N Offline
      N Offline
      Not Active
      wrote on last edited by
      #2

      Perhaps it's just my monitor but the bold you mention is difficult to see. If I understand your problem however; First, you could ignore the primary keys and insert the other columns into you new table. Provided there is no associations to them that must be maintained Second, create the combined table as such NewId(PK), ID, IDD, Name


      only two letters away from being an asset

      M 2 Replies Last reply
      0
      • N Not Active

        Perhaps it's just my monitor but the bold you mention is difficult to see. If I understand your problem however; First, you could ignore the primary keys and insert the other columns into you new table. Provided there is no associations to them that must be maintained Second, create the combined table as such NewId(PK), ID, IDD, Name


        only two letters away from being an asset

        M Offline
        M Offline
        Muammar
        wrote on last edited by
        #3

        Thank you Mark, I had the very same thought, but then I'll have to make the NewID primary key column autonumbered "I've done this before".. please notice that these tables are not no the same platform and cant be related as I would export the lower copy and combine it with the upper one "the one you suggested to have a new ID primary column".. Anyhow, thanks mate and I'll just wait for other replays today and if no better solution was suggested, I'll go for this one.


        We will either find a way, or make one!   (\ /)   (- .-) C(''')(''')

        1 Reply Last reply
        0
        • N Not Active

          Perhaps it's just my monitor but the bold you mention is difficult to see. If I understand your problem however; First, you could ignore the primary keys and insert the other columns into you new table. Provided there is no associations to them that must be maintained Second, create the combined table as such NewId(PK), ID, IDD, Name


          only two letters away from being an asset

          M Offline
          M Offline
          Muammar
          wrote on last edited by
          #4

          Hey Mark, just to let you know, I found the answer and it was to simply create a composite key!


          We will either find a way, or make one!   (\ /)   (- .-) C(''')(''')

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups