473,409 Members | 1,970 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,409 software developers and data experts.

INNER JOINS: how to create??

29
Hello everyone,

Here is the scanario:

Tables:

T_Physicians
fields: (pk)TaxID, PhysicianName

T_ServiceCodes (I have 3 of these tables)
fields: (pk)Servicecode, ServiceName, Price

Mission:

Associate each TaxID to each ServiceCode, mind you, each Physician have their own Service codes that they bill.

Should I build a Query with a Criteria to find it in 1 Table or Build Separate lookup ServiceCodes table to reference each TaxID in T_Physicians table?

Enclosed is the SQL code of my QUERY;

What i'm trying to accomplish is this: say for example the Physician TaxID is equal to Sibley Hospital, I would like a means to automatically reference the SibleyCPT table inorder to choose my Sibley service codes and prices each time the specified TaxID is selected.

SELECT T_Service.ServiceNumID, T_Service.TaxIDNum, T_Physicians.TaxID, T_Physicians.HospitalName, T_Service.SibleyNum, T_SibleyCpt.CPTcode, T_SibleyCpt.Charge, T_Service.ECCcptNum, T_ECCcpt.CPTcode, T_ECCcpt.Charge
FROM T_SibleyCpt INNER JOIN (T_Physicians INNER JOIN (T_ECCcpt INNER JOIN T_Service ON T_ECCcpt.ECCcptNum = T_Service.ECCcptNum) ON T_Physicians.TaxIDNum = T_Service.TaxIDNum) ON T_SibleyCpt.SibleyNum = T_Service.SibleyNum;

Please Help
thank you in advance
---adigga1
Oct 2 '08 #1
1 1079
Stewart Ross
2,545 Expert Mod 2GB
Adigga1, you have double-posted your question (see this thread) which is against site rules. As the other thread is very similar and has been answered I am closing this thread to avoid wasting the time of the experts and other voluntary contributors who answer questions on this site.

MODERATOR
Oct 2 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Prem | last post by:
Hi, I am having many problems with inner join. my first problem is : 1) I want to know the precedance while evaluating query with multiple joins. eg. select Employees.FirstName,...
8
by: kieran | last post by:
Hi, I have the following sql statement. I originally had the statement with two INNER JOINS but in some situations was getting an error so changed the last INNER JOIN to a LEFT OUTER JOIN (as...
2
by: gkellymail | last post by:
the following query works fine: select link.idx, link.x_table, link.x_id_a, link.x_id_z, a.strandid, b.strandid from link_detail, link, strand A, strand B where link_detail.x_table =...
6
by: dmonroe | last post by:
hi group -- Im having a nested inner join problem with an Access SQl statement/Query design. Im running the query from ASP and not usng the access interface at all. Here's the tables: ...
52
by: MP | last post by:
Hi trying to begin to learn database using vb6, ado/adox, mdb format, sql (not using access...just mdb format via ado) i need to group the values of multiple fields - get their possible...
3
by: Zeff | last post by:
Hi all, I have a relational database, where all info is kept in separate tables and just the id's from those tables are stored in one central table (tblMaster)... I want to perform a query, so...
2
by: Rick | last post by:
VS 2005 & Firebird DB 1.5 I have a query for Customer orders that has several inner joins to show things like Terms name (from termsnum) and Sales Rep name (from repnum) etc. I have written...
12
by: Chamnap | last post by:
Hello, everyone I have one question about the standard join and inner join, which one is faster and more reliable? Can you recommend me to use? Please, explain me... Thanks Chamnap
0
by: stanlew | last post by:
Happy New Year everyone! I'm new to both T-SQL and this forum. I'm currently doing an internship and my first task was to create a small program which will send an email detailing the sales of the...
9
by: shapper | last post by:
Hello, I am used to SQL but I am starting to use LINQ. How can I create Left, Right and Inner joins in LINQ? How to distinguish the different joins? Here is a great SQL example:...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.