Date: Thu, 22 Mar 2012 11:32:55 -0400
Reply-To: Jim Groeneveld <jim.1stat@YAHOO.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Jim Groeneveld <jim.1stat@YAHOO.COM>
Subject: SQL Count peculiarity
Hi friends,
Does anyone know anything about the following oddity?
The SAS SQL documentations presents its aggregate functions
and says that COUNT, FREQ and N are interchangeable.
However, nothing is less true as the following log snippet shows:
MPRINT(CROSSREF): SELECT N(*) INTO : NofRows FROM AnyTable;
ERROR: * used for a function other than COUNT.
Of course, the only example where all rows are counted uses COUNT.
And COUNT does NOT cause an error (I didn't try FREQ).
Regards - Jim.
--
Jim Groeneveld, Netherlands
Statistician/SAS consultant
http://jim.groeneveld.eu.tf
|