Hi,
Is there a possible way of performing a count when doing a PROC SQL.
An example of what I am trying to calculate:
/*
proc sql;
connect to db2 ;
create table mylib.a as
select * from connection to db2
( SELECT
abc as a
, def as b
, count(distinct abc) as a_count
from abcdef
where x = y ) ;
*/
this gives me an error.
An unexpected token "AS" was found following "STINCT abc)". Expected tokens may include: ")". SQLSTATE=42601
Do I need to specify something. I have not come across this kind of error before.
Thanks,
Raj
Is there a possible way of performing a count when doing a PROC SQL.
An example of what I am trying to calculate:
/*
proc sql;
connect to db2 ;
create table mylib.a as
select * from connection to db2
( SELECT
abc as a
, def as b
, count(distinct abc) as a_count
from abcdef
where x = y ) ;
*/
this gives me an error.
An unexpected token "AS" was found following "STINCT abc)". Expected tokens may include: ")". SQLSTATE=42601
Do I need to specify something. I have not come across this kind of error before.
Thanks,
Raj