Select
  pd.PUID As DataSetPuid,
  rl.PSEQ As rl_pseq,
  PDATASETTYPE.PDATASETTYPE_NAME,
  PDATASETTYPE.PDESCRIPTION,
  PIMANFILE.PFILE_NAME,
  PREF_NAMES_0.PVAL_0
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 PREF_TYPES
On
  rl.PUID   = PREF_TYPES.PUID
And rl.PSEQ = PREF_TYPES.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')