I am fetching a table from a table and it is automatically sorting itself into alphabetical order. I understand you cannor predict the order of a column and that a artifact could be sorting it alphabetially. However, is there a way for me to order column in that same way that it sits within fr_dcode.
the column is "Executing Broker" which is being fetched form "fr_dcode"
select distinct
rtrim(portfolio_name) as "_Aladdin Portfolio",
b.level1_cd as "_Executing Broker",
'Y' as "_Yes"
from t$temp5 as a, fr_dcode as b
where a.name=b.value
order by "_Aladdin Portfolio"
)
LOOP
"Aladdin Portfolio" := var_r."_Aladdin Portfolio";
"Executing Broker" := var_r."_Executing Broker";
"Yes" := var_r."_Yes";
RETURN NEXT;
END LOOP;