BookmarkSubscribeRSS Feed
mjack
Calcite | Level 5

Hi Experts,

Using proc freq,   how can I achieve the results achieved by the following queries :

proc sql;

     select count(distinct(columnname))  from datasetname where columnname > 6   and columnname < 100;

quit;

proc sql;

     select columnname, count(*) from datasetname where columnname > 6   and columnname < 100;

quit;

Because when I run above sqls I get   'ERROR: SPDS Sql Passthru Error.'

Pls help...

1 REPLY 1
ballardw
Super User

The proc freq equivalent woud be

proc freq data=datasetname;

     where 6 < columnname < 100;

     tables columname/ nopercent;

run;

but your problem may be related to the DB connection.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 1 reply
  • 364 views
  • 0 likes
  • 2 in conversation