Select
  pd.PUID As DataSetPuid,
  PDATASETTYPE.PDATASETTYPE_NAME,
  PIMANFILE.PFILE_NAME,
  PREF_NAMES_0.PVAL_0,
  rl.PSEQ
From
  PDATASET pd
Inner Join PREF_LIST_0 rl On (rl.PUID = pd.PUID)
Left Join PREF_NAMES_0 On (rl.PUID = PREF_NAMES_0.PUID And rl.PSEQ = PREF_NAMES_0.PSEQ)
Inner Join PDATASETTYPE On (pd.RDATASET_TYPEU = PDATASETTYPE.PUID)
Left Join PIMANFILE On rl.PVALU_0 = PIMANFILE.PUID
Where
  (
    pd.PUID               In ('A4eNR19_TzDfjB', 'hcTNBtqRTzDfjB')
  And ( 
       PREF_NAMES_0.PVAL_0 In ('UGPART', 'IdeasPart', 'IdeasAssembly','IdeasDrawing', 'AsmFile', 'PrtFile', 'DrwFile') 
       )
  )
