As below as attached is my query to retrieve data from my database.
There is same multiple shortagepn from my database but i just wanted them to appear as 1 on my display table. the thing now is sometimes there is no data found or even duplicated shortagepn appear on my table. is there something wrong with my query or is there anyway i can use other than using the distinct method.
Dim qryselect As String = "Select distinct projects.shortagepn, projects.pono,projects.description,projects.uploadby, projects.duedate, projects.poqty,projects.actualbyrname_cus,projects.programtype,projects.shortqty,projects.assembly_mo,outstandingpo.supplier_name,projects.sides,projects.familyid,projects.mono, companyname.companyname FROM (loading.projects INNER JOIN loading.outstandingpo ON outstandingpo.item_number = projects.shortagepn) INNER JOIN loading.companyname ON projects.familyid = companyname.familyid WHERE projects.familyid='" & familyid & "' AND projects.assembly_mo='" & assemblyno & "' AND projects.mono='" & mono & "' AND projects.shortagepn <>''"