These are not tested.
Modified OP's first query:
(Changed parts are capitalized)
Code:
select a.ref_no
, b.amt
, b.col2
from Headtable a
left join
LATERAL
( select *
from Dettable d
where a.ref_no = d.ref_no
fetch first 1 row only
) B
ON 0=0
Modified OP's second query:
(Changed parts are capitalized)
Code:
select a.ref_no
, (select d.amt
from Dettable d
where a.ref_no = d.ref_no
ORDER BY AMT, COL2
fetch first 1 row only)
, (select d.col2
from Dettable d
where a.ref_no = d.ref_no
ORDER BY AMT, COL2
fetch first 1 row only)
from Headtable a