title: How to escape a round bracket '(' in SQL?
body: <p>I am trying to use reference cursor for a sql query but I think I am missing >escape notation somewhere. I have already escaped " ' " but I am unsure about >the round brackets.</p>
  
  <p>I am getting "international_flag : invalid identifier" error at open ref_cursor statement. I have tried a bunch of things to escape round brackets because I think that is why it is not picking the variable international_flag. Any leads will be much appreciated.</p>
  
  <pre><code>declare
  international_flag          varchar2(4) := 'Y';
  term_code       varchar(8) := '201709';
  type stu_ref_cursor is      ref cursor;
  ref_cursor                  stu_ref_cursor;
  ref_cursor_select_statement varchar2(1000);
  
  begin
  ref_cursor_select_statement := 
      'Select
          CONFID_MSG,
          ETHNIC_CODE,
          STUDENT_NAME,
          POTSDAM_ID(STUDENT_PIDM),
          CLASS,
          LEVL_CODE,
          AGE,
          BIRTHDATE,
          fp_get_coll_box(STUDENT_PIDM),
          f_get_on_campus_email_addr(STUDENT_PIDM),
          RESD_IND,
          STUDENT_PIDM,
          REG_HRS,
          SGB_TERM_ADMIT,
          GENDER
          From  SEM_REG_STUDENT_NONGPA
          Where REG_TERM = term_code
                And STATUS = ''AS''
                And REG_TERM_STATUS = ''Y''
                And 
                   (
                     international_flag = ''N''
                     Or
                      (international_flag = ''Y'' And f_international_student_natn(STUDENT_PIDM) Is Not NULL)
                     Or
                      (international_flag = ''U'' and CITIZEN = ''Y'')  
                   )
          Order By STUDENT_NAME';
  
      open ref_cursor for ref_cursor_select_statement;
  
      end;
  </code></pre>