reading a data view from an oracle dataset

Reply
Occasional Contributor
Posts: 16

reading a data view from an oracle dataset

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);


           odbcco.bib_adhoc.vw_marketing_datamart_monthly; run;

                                _

                              22

                             200

  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,
UNION, WHERE. 

 

Thank you

Anthony

ERROR 200-322: The symbol is not recognized and will be ignored.





















Super Contributor
Posts: 333

Re: reading a data view from an oracle dataset

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?

EJ

Occasional Contributor
Posts: 16

Re: reading a data view from an oracle dataset


Thank you asjackso1,

bib_adhoc is a schema, i was missing it in the libname definition. i have included it and it works fine


Anthony

Ask a Question
Discussion stats
  • 2 replies
  • 163 views
  • 0 likes
  • 2 in conversation