I have an SQLite3 Database and I need to select DISTINCT from a specific row (H981.VISITID) from the following query:
`SELECT 
         H981.VISITID AS pat_no, H98.MED_REC_NO 
FROM     H98_Paradigm_Encounters H98
LEFT OUTER JOIN H98_MLO_Encounters H981 
  ON H98.MED_REC_NO=H981.EXTERNALID`
The results are currently producing something like this:
|pat_no|med_rec_no|note|
|1     |4545      |Test|
|2     |4545      |Test|
|3     |4545      |Test|
|4     |4545      |    |
|1     |4545      |    |
|2     |4545      |    |
|3     |4545      |    |
|4     |4545      |Test|
I would like the results to produce something like:
|pat_no|med_rec_no|note|
|1     |4545      |Test|
|2     |4545      |Test|
|3     |4545      |Test|
|4     |4545      |    |
I've tried several things I've seen on here, but nothing seems to work. Any advice?
 
     
     
    