Question : Simple SQL Join Query Syntax Issue



I am running a Select Statement by fetching values from Multiple Tables.

I have

Member  Table
MemberInsuranceCompany Table
InsuranceCompanies Table

MemberInsuranceCompany Tables carries InsuranceCompanyId and MemberId.
InsuranceCompanies Tables carries only Insurance details ..!
I need to fetch MemberName and his Insurance Company.

Can you please guide me in the syntax ..!
Code Snippet:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
select Mem.LastName + ','+ Mem.FirstName as [MemberName],
 Rx.RxproName,DOB
-- ,IC.ICName 
from memberstatus MS 
inner join Members Mem
on Mem.MemberId = MS.MemberId
inner join Rxprocessors Rx
on Rx.RxProcessorId = Mem.RxProcessorId
inner join MemberInsuranceCompany MIC
on MIC.MemberId = Mem.MemberId
--inner Join InsuranceCompanies
--on	IC.InsuranceCompanyId = MIC.InsuranceCompanyId
where MS.status = 'A'

Answer : Simple SQL Join Query Syntax Issue

Something like this?
1:
2:
3:
4:
5:
6:
7:
8:
select Mem.LastName + ','+ Mem.FirstName as [MemberName], 
 Rx.RxproName,DOB,IC.ICName  
from memberstatus MS  
inner join Members Mem on Mem.MemberId = MS.MemberId 
inner join Rxprocessors Rx on Rx.RxProcessorId = Mem.RxProcessorId 
inner join MemberInsuranceCompany MIC on MIC.MemberId = Mem.MemberId 
inner Join InsuranceCompanies IC on IC.InsuranceCompanyId = MIC.InsuranceCompanyId 
where MS.status = 'A'
Random Solutions  
 
programming4us programming4us