I need to be able to join table a on table b multiple times like in the code example below. If I was working against a SQL-server i could make a sp but this is a AS/400-machine I have to work against.
Thanks
Code:
select oroordnr,b.ufutftxt,c.ufutftxt,d.ufutftxt,e.ufutftxt,f.ufutft
xt,orluffrg,ohoordnr,ohlevnmn,oholwelu from ohorhuvp as o
inner join ororradp as a on o.ohoordnr = a.oroordnr
inner join ufufregp as b on a.orutfsrt = b.ufutfkod and b.ufutftyp =
'SRT'
inner join ufufregp as c on a.orutffrt = c.ufutfkod and c.ufutftyp =
'FRT'
inner join ufufregp as d on a.orutfltp = d.ufutfkod and d.ufutftyp =
'LTP'
inner join ufufregp as e on a.orutfluf = e.ufutfkod and e.ufutftyp =
'LUF'
inner join ufufregp as f on a.orutfvar = f.ufutfkod and f.ufutftyp =
'VAR'
where o.oholwelu =200732
Thanks