06-20-2013 11:07 AM
I am able to connect to an oracle database but when i put a query below which i have been using in oracle sql developer i get the error message also below
select distinct userid from BIB_ADHOC.vw_mk_datamart_monthly where smonth in (201302);
ERROR 22-322: Syntax error, expecting
one of the following: a name, ;, (, ',', ANSIMISS, AS,
CROSS, EXCEPT, FULL, GROUP,
HAVING, INNER, INTERSECT, JOIN, LEFT, NATURAL,
NOMISS, ORDER, OUTER, RIGHT,
ERROR 200-322: The symbol is not recognized and will be ignored.
06-20-2013 11:21 AM
SAS doesnt use three level dataset names odbcco.bib_adhoc.vw_marketing_datamart_monthly
before the period should just be what you use to connect to oracle (libname of the connection). after the period should be the view name alone. If the whole thing is the view name then you are probably running into SAS naming restrictions (<32 characters, no special characters)
Hard to tell from the way it was pasted in. What does the full code look like?
06-20-2013 11:45 AM
Thank you asjackso1,
bib_adhoc is a schema, i was missing it in the libname definition. i have included it and it works fine