02-26-2014 02:07 PM
Might be a simple answer to this but I'm not seeing it. When I perform a Proc SQL CREATE TABLE, I get a full drop-down menu for Export, including types such as .txt, .cvs, etc. However when just running a SELECT query I don't get those options, just .html or .lst based on the output types you have setup. So I sometimes do a create just so get the full export options. Is there a better way of doing this? Please note this is only for occasional quick hits on data, not something that lends itself to automation.
02-26-2014 02:28 PM
SELECT doesn't create external files (like csv files) it prepares (selects) columns.
Where these go depends on the rest of the query. When SELECT is not preceded by CREATE the result set is sent to default output controlled by ODS destination. - Unless the "into :mVarname " clause is present.
PROC SQL CREATE doesn't create csv-type files, only views or tables of the type appropriate to the libname to which the CREATE refers.
Where are you seeing these picking-lists?
02-26-2014 02:39 PM
After selecting Export from Output Data I'm presented with the full suite of export options. The main difference I see is you don't get 'Output Data' with a select query...you get 'Results...'
Would just be nice to be able to export right from a SELECT.
02-26-2014 03:59 PM
Not sure of your requirements here, but the select statement produces a report output. Exporting to csv requires an actual dataset. Is there a reason why you are directly coding a select statement not using a create as well?
On the other hand, you can send a report to Excel if you have AMO installed.