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. General Programming
  3. C / C++ / MFC
  4. SQL Question

SQL Question

Scheduled Pinned Locked Moved C / C++ / MFC
databasequestiontutorial
2 Posts 1 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.
  • S Offline
    S Offline
    skfnmuisl dmufa oi
    wrote on last edited by
    #1

    Hi. I designed a database as data source for an application I wrote. The database has about 19 tables and several 1:n relations. Esspecially one table, that has 2-3 relations, like [Patienten].[Kasse] = [Kassen].[ID]. Now I'd like to query this table and instead of all the reference longs should stay the [name] field of the related record. I know how to do it for one field with an inner join like 'SELECT Name, Vorname, Kassen.Name FROM Patienten INNER JOIN Kassen ON Patienten.Kasse = Kassen.ID' But how can I do it for more fields? I can't cascade INNER JOIN, or is it possible? Thankfull for any answer... -------------------------------------------------- "Pseudocode is code to demonstrate a concept, not designed to be run. Like certain Microsoft software. "

    S 1 Reply Last reply
    0
    • S skfnmuisl dmufa oi

      Hi. I designed a database as data source for an application I wrote. The database has about 19 tables and several 1:n relations. Esspecially one table, that has 2-3 relations, like [Patienten].[Kasse] = [Kassen].[ID]. Now I'd like to query this table and instead of all the reference longs should stay the [name] field of the related record. I know how to do it for one field with an inner join like 'SELECT Name, Vorname, Kassen.Name FROM Patienten INNER JOIN Kassen ON Patienten.Kasse = Kassen.ID' But how can I do it for more fields? I can't cascade INNER JOIN, or is it possible? Thankfull for any answer... -------------------------------------------------- "Pseudocode is code to demonstrate a concept, not designed to be run. Like certain Microsoft software. "

      S Offline
      S Offline
      skfnmuisl dmufa oi
      wrote on last edited by
      #2

      Don't mind, I found out that cascading inner joins is possible. -------------------------------------------------- "Pseudocode is code to demonstrate a concept, not designed to be run. Like certain Microsoft software. "

      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