2 Replies Latest reply on Jan 12, 2017 3:33 PM by Fofana

    quotation mark error in apex_collection.create_collection_from_query

    Fofana

      Hi

      I am creating a collection in oracle (apex_collection.create_collection_from_query) by making a request to sqlserver using dblink as follows. My query string is:

      'select distinct "pin", "id", "group_no"

      from table1@dblink1

      where "pin" = '''||:P10_XX||''''

       

      I am getting the following error:

      ORA-06550: line 12, column 20: PL/SQL: ORA-00904: "group_no": invalid identifier ORA-06550: line 12, column 1: PL/SQL: SQL Statement ignored

       

      But this works fine in TOAD:

      SELECT distinct "pin", "id", "group_no"

      FROM table1@dblink1

      WHERE "pin" = 'ABCDE00001';

       

      The direct query without the quotation marks does not work neither. Is there a way to tell the sql engine to ignore the quotation marks in the string?

       

       

       

       

      thanks