In reply to Chris Hemedinger.

so VIEWs have a different effect when compiled.

Aother issue occurs with select into :names

proc sql noprint ;
select name into :names separated by ' '
from sashelp.class where ranuni(1)>.9 ;
%put (&names) records ar &sysnobs;
quit;

partial log

183 select name into :names separated by ' '
184 from sashelp.class where ranuni(1)>.9 ;
185 %put (&names) records ar &sysnobs;
(Mary Philip) records ar 19
186 quit;

SYSNOBS shows 19 but only two names were created

198 proc sql noprint ;
199 select name into :names separated by ' '
200 from sashelp.class where ranuni(1)>.9 ;
201 %put &sqlobs (&names) from(?) &sysnobs ;
5 (Alice Henry James Philip William) from(?) 19
202 select name into :names separated by ' '
203 from sashelp.class where ranuni(1)>.9 ;
204 %put &sqlobs (&names) from(?) &sysnobs ;
2 (Mary Philip) from(?) 19
205 quit;

Seems that ranuni(1) in SQL does not always start at the same seed in SQL