BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Rsadiq
Calcite | Level 5

Hello I am getting an oracle error which I have never seen before, saying I'm missing a right parathesis? I checked a few times to see where it should be and can not seem to see.

 

 

 

ERROR: ORACLE prepare error: ORA-00907: missing right parenthesis. SQL statement: select distinct P.mbr_id, P.ENRL_DT,
       P.PGM_CATGY_TYP_ID, P.PGM_TYP_ID, P.MBR_PGM_STS_TYP_ID, P.MBR_PGM_STS_RSN_TYP_ID, P.End_DT, P.MBR_PGM_ID from
       STG_HSR.MBR_PGM P where P.ENRL_DT is not null and P.MBR_PGM_STS_RSN_TYP_ID =81 and P.MBR_PGM_STS_TYP_ID =05 and alt_pol_nbr
       in ('X05951','005951','00005951', '000X05951','0X05951','000005951',
       'X06163','006163','00006163','000X06163','0X06163','000006163',
       'X00181','0X00181','000X00181','000181','00000181','000000181', '36000','036000','00036000','000036000', '360000', 'X06754',
       '006754','00006754','000X06754','0X06754','000006754', 'X06764', '006764','00006764','000X06764','0X06764','000006764',
       'X06029', '006029','00006029','000X06029','0X06029','000006029', 'X07015',
       '007015','00007015','000X07015','0X07015','000007015', 'X08427', '008427','00008427','000X08427','0X08427','000008427',
       'X08401','008401','00008401','000X08401','0X08401','000008401',
       'X08426','008426','00008426','000X08426','0X08426','000008426', 'X08434','008434','00008434','000X08434',
       '0X08434','000008434', 'X09211','009211','00009211','000X09211','0X09211','000009211',
       'X09227’,’009227’,’00009227’,’000X09211’,’0X09227’,’000009227’,     
       ‘X09228’,’009228’,’00009228’,’000X09228’,’0X09228’,’000009228’,     
       'X09229’,’009229’,’00009229’,’000X09229’,’0X09229’,’000009229’).

1 ACCEPTED SOLUTION

Accepted Solutions
Quentin
Super User

In the last three lines of your list of quoted items, a number of the items have curly quote marks, also known as "smart quotes," rather than straight quote marks, e.g. red quotes below:

 

   'X09227,009227,00009227,000X09211,0X09227,000009227,     

 

This can happen sometimes if you type code into a word processor, or copy code from a word document or PDF.  Curly quotes are bad for code. 

 

I would open the code in your favorite SAS code editor, replace them with straight quote marks, and try again.

BASUG is hosting free webinars Next up: Mike Sale presenting Data Warehousing with SAS April 10 at noon ET. Register now at the Boston Area SAS Users Group event page: https://www.basug.org/events.

View solution in original post

1 REPLY 1
Quentin
Super User

In the last three lines of your list of quoted items, a number of the items have curly quote marks, also known as "smart quotes," rather than straight quote marks, e.g. red quotes below:

 

   'X09227,009227,00009227,000X09211,0X09227,000009227,     

 

This can happen sometimes if you type code into a word processor, or copy code from a word document or PDF.  Curly quotes are bad for code. 

 

I would open the code in your favorite SAS code editor, replace them with straight quote marks, and try again.

BASUG is hosting free webinars Next up: Mike Sale presenting Data Warehousing with SAS April 10 at noon ET. Register now at the Boston Area SAS Users Group event page: https://www.basug.org/events.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 1141 views
  • 0 likes
  • 2 in conversation