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. Web Development
  3. ASP.NET
  4. Another querry problem

Another querry problem

Scheduled Pinned Locked Moved ASP.NET
questionhelplearning
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.
  • C Offline
    C Offline
    Commickey
    wrote on last edited by
    #1

    some personeel have education history others have short course history I have 3 tables: Personeel, Courses and Education. Personeel table have primary key persId which is foreign in the other 2. My question: How do I get the personel details of: those havin education history those having course history Combine the above two in one list and display as just a single list in a datagrid? This will become the list of active employees. How will the querry look like and what other things do I need to do... I have tried several things out but I am really stuck. Thanks alot, Commickey

    P 1 Reply Last reply
    0
    • C Commickey

      some personeel have education history others have short course history I have 3 tables: Personeel, Courses and Education. Personeel table have primary key persId which is foreign in the other 2. My question: How do I get the personel details of: those havin education history those having course history Combine the above two in one list and display as just a single list in a datagrid? This will become the list of active employees. How will the querry look like and what other things do I need to do... I have tried several things out but I am really stuck. Thanks alot, Commickey

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

      SELECT P.ID FROM PERSONNEL AS P INNER JOIN COURSES AS C ON P.ID = C.PERSONNEL_ID INNER JOIN EDUCATION AS E ON P.ID = E.PERSONNEL_ID Could try something like that, but without really knowing your table structure it's hard to say. If you have course items and education items, you should probably think about many-to-many linking tables in between these and personnel. This will save duplication of all the course details.

      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