Hello Friends,
I have three table
->PatientDetails
->ParentDetails
->InsuranceDetails
-Patient id is the common column in all the three tables...
While saving the data in table using VB.Net there is a column in PatientDetails i.e. Insured
If the patient is insured then only the values from text boxes and the patient id will be saved in InsuranceDetails Table else the patientid wont exist in that table
But I want to retrieve data from all the three tables even if the patient is not insured the blank columns shud be atleast shown to the user
for that I had written a query as below but it is not showing any values
please check my query and help me on this...I just used a join for patientid
select
ipd.InPatientID,
ipd.Fname+' ' +ipd.LName as 'Patient Name' ,
ipd.Gender,
ipd.BirthDate,
ipd.AccType as 'Account Type',
ipd.Minor,
ipg.GFName+' ' +ipg.GLName as 'Guardian name',
ipd.Insured,
ipi.Insurance1,
ipi.Policy1,
ipi.GroupNo1,
ipi.Guarantor,
ipi.Employer
from
HMS.dbo.PatientDetails ipd,
HMS.dbo.ParentDetails ipg,
HMS.dbo.InsuranceDetails ipi
where
ipd.InPatientID=ipg.InPatientID or
(ipd.InPatientID=ipi.InPatientID and
ipi.InPatientID=ipg.InPatientID)
Please provide some help on this....
Thanks in advance