BookmarkSubscribeRSS Feed
80sMetalForever
Calcite | Level 5

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.

4 REPLIES 4
Peter_C
Rhodochrosite | Level 12

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?

80sMetalForever
Calcite | Level 5

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.

Capture.JPG

nrose
Quartz | Level 8

Hi,

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.

Nick

80sMetalForever
Calcite | Level 5

sounds like it's just as you say...you need an actual dataset

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 1059 views
  • 0 likes
  • 3 in conversation