SQL Question
-
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. "
-
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. "
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. "