0

(i want distinct in msaccess query) i have two tables where my data is matching and repeating in datagridview im working on report plz help me

here is my simple join query

select Labortary.Test_Name,Labortary.Test_Charges,LabortaryTestRecord.[Total Amount] 
from LabortaryTestRecord,Labortary
where LabortaryTestRecord.[PatientID]=Labortary.Patient_id
and LabortaryTestRecord.[PatientID]=34
Cœur
  • 37,241
  • 25
  • 195
  • 267

1 Answers1

0

You must add DISTINCT keyword:

SELECT DISTINCT Labortary.Test_Name,Labortary.Test_Charges,
 LabortaryTestRecord.[Total Amount] 
FROM LabortaryTestRecord,Labortary
WHERE LabortaryTestRecord.[PatientID]=Labortary.Patient_id
   and LabortaryTestRecord.[PatientID]=34
Ivan Cachicatari
  • 4,212
  • 2
  • 21
  • 41