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
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Inserting Data in Table (RelationShip Problem)

Inserting Data in Table (RelationShip Problem)

Scheduled Pinned Locked Moved Database
databasehelp
2 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.
  • K Offline
    K Offline
    k_bhawna
    wrote on last edited by
    #1

    Hi EveryOne, I have created 1 table in my DB named F-orgs containg only 1 field F_orgs. And it’s the primary key. Its Data Values are F_orgs F01 F02 F03 F04 and other table Item_Details having F_Orgs as the foreign key. and One Item can be used by multiple F_Orgs. Now the prob is that: My table Item Details is not accepting multiple values under F__orgs field. It is only taking 1 value like Item_No F_orgs 1414-3635 F01 1414-3636 F02 I want this Item_No F_orgs 1414-3637 F01, F02 1414-3638 F02, F03 And it is but obvious while inserting it is checkn values with F_Orgs Table (Relationship Bw F_Orgs and Item_Details Table) Rite. So is my logic going wrong somewhere. Can anyone have any idea, where i m going wrong. Plz tell. Regards

    P 1 Reply Last reply
    0
    • K k_bhawna

      Hi EveryOne, I have created 1 table in my DB named F-orgs containg only 1 field F_orgs. And it’s the primary key. Its Data Values are F_orgs F01 F02 F03 F04 and other table Item_Details having F_Orgs as the foreign key. and One Item can be used by multiple F_Orgs. Now the prob is that: My table Item Details is not accepting multiple values under F__orgs field. It is only taking 1 value like Item_No F_orgs 1414-3635 F01 1414-3636 F02 I want this Item_No F_orgs 1414-3637 F01, F02 1414-3638 F02, F03 And it is but obvious while inserting it is checkn values with F_Orgs Table (Relationship Bw F_Orgs and Item_Details Table) Rite. So is my logic going wrong somewhere. Can anyone have any idea, where i m going wrong. Plz tell. Regards

      P Offline
      P Offline
      Paddy Boyd
      wrote on last edited by
      #2

      I think your insert should be trying to get records like this: 1414-3637 F01 1414-3637 F02 1414-3638 F02 1414-3638 F03 When you put comma separated values into a field, the DB checks that the string as a whole matches a single entry in the F_Orgs table.

      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