04-30-2015 04:31 PM
I have Oracle partitions that I'm trying to accessfrom SAS. I am able to access these partitions from Oracle SQL* Developer. However when I use the code in SAS it throws an error:
Here is the code:
connect to oracle(user=&DBUser password=&DBUserPwd path=&DBConn);
create table dir.D1 as select * from connection to oracle
(select count(*) from source_table PARTITION (20140101));
The error received
ERROR: ORACLE prepare error: ORA-00905: missing keyword.
I tried partition by/for and enclosing the dates in quotes, doesn't seem to work. Any ideas?
05-01-2015 08:04 AM
What is it that you are trying to do, can you give an example of the data you have and the data you want? I think partition is the problem but I'm not sure.
05-01-2015 10:54 AM
The below partition query gives the total rows for that particular month in SQL Developer: The reason in using partition is to expedite the processing speed, I just wanted to get a basic query working before getting into the details ( the data/partition is not the problem) somehow this has to be tuned to work in SAS:
select count(*) from source_table partition for (20140101) a
where a.date_key between 20140101 and 20140131;