12-14-2015 07:55 AM
I tried once to PRINT select query in PROC PRINT, its worked for one time. But after the session turned off, I am unable to PRINT.
Below is the sample query.
SELECT a,b,c FROM XYZ;
Many thanks in advance.
12-14-2015 08:48 AM
By what do you mean "print" the query? Just putting the select will output the results directly to the output window if running interactive SAS unless you have turned that option off with:
You can turn it back on with:
If you mean you want to keep the data as a file then its a simple two step process:
extract data to a dataset then print the dataset:
proc sql; create table WANT as select A, B, C from HAVE; quit; ods rtf file="c:\results.rtf"; proc report data=want; columns _all_; run; ods rtf close;
Its very dependant on what you are doing/want which is not clear from your post.
12-14-2015 09:54 AM
And how do you want to display them, via file, output window? Have you tried the ods results? What about ods listing. What software are you using, is is interactive SAS or Batch.
12-14-2015 11:31 PM
12-14-2015 11:25 AM
ods listing; proc sql; select * from sashelp.cars; quit;
Then open the output window (not sure where its located as dont use EG, probably off the menu bar at the top, something like show output window).
Need further help from the community? Please ask a new question.