|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
can i combine 17 table in 1 query?
Dear professionals
i have a database that has around 17 different table which stores the info of patients and other related info. now i have to get all info from all tables based on date and patient file no. All the tables have parent-child relationships. i hope i am making sense here. now the situation is i have to retrieve one patient info from all tables please help will be highy appreciated thanks in advance |
|
#2
|
||||
|
||||
|
Wow, 17 related tables!? Why so many? Sounds like you need to reorganize your tables. As far as performance and efficiency go, I would think no more than a couple of related tables would make sense, but I can't imagine why it wouldn't work. Have you tried it? What database are you using? What platform? What language/program are you doing this in? Vauge questions will get vauge answers (if any).
__________________
Matt |
|
#3
|
|||
|
|||
|
select * from table1 as a, table2 as b ... and so on ... table 17 as r WHERE a.id=b.id2 and b.ID=c.ID2 and ... and so on ... and p.ID =r.ID2
OKAY? |
![]() |
| Viewing: Dev Shed Forums > Databases > Database Management > can i combine 17 table in 1 query? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|