First, I agree that this problem is best be solved in a PROC REPORT.
But if you must somehow only use SQL, you would have to place a constraint on subranges of the column. For instance, if you choose to only use values of -1 through +1 to represent -100% through 100%, and use only other values to be presented in comma format, you could do this.
Take the sashelp.demographics dataset, with variables POP (actual population count) and POPURBAN (percentage represented as zero through one), put into the same column.
proc format;
value pc -1 - 1=[percentn10.2]
other=[comma10.0];
run;
proc sql;
create table want as
select name, 1 as row, pop as column_var format=pc10.2 from sashelp.demographics
union
select name, 2 as row, popurban as column_var format=pc10.2 from sashelp.demographics
order by name, calculated row
;
quit;
... View more