Database Management
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesDatabase Management

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old February 29th, 2004, 10:19 AM
dbuser123 dbuser123 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 3 dbuser123 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
  #2  
Old February 29th, 2004, 05:32 PM
marron79's Avatar
marron79 marron79 is offline
Rut row Raggy!
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jul 2001
Location: Tornado Alley
Posts: 558 marron79 User rank is Private First Class (20 - 50 Reputation Level)marron79 User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 9 h 41 sec
Reputation Power: 8
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

Reply With Quote
  #3  
Old March 3rd, 2004, 07:17 AM
Rafael! Rafael! is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 12 Rafael! User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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?

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesDatabase Management > can i combine 17 table in 1 query?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
Stay green...Green IT