Escape ' ' while creating a collection in Oracle APEX

Hi all

I create a collection where I use substr and instr functions and it gives an error like below

• ORA-06550: line 14, column 79: PLS-00103: encountered the symbol "(,-1)) OWSR, PRIM_ADD null, null PRIMA" when expecting one of the following values :), * & = - + <>/ at is mod remains not rem < an exponent (*) > <>or! " = or ~ = > = < = <>and or as like2 like4 likec between | submultiset of type multiset Member


Text of the passage where pops up an error:

APEX_COLLECTION. () CREATE_COLLECTION_FROM_QUERY
p_collection_name = > 'RANGE_COLLECTION ',.
p_query = > ' SELECT
: P999_LOC_TYPE ADD_TYPE_ID
TRIM(:P999_OWSR) PRIM_ST
, SUBSTR (TRIM(:P999_OWSR), 1, 1) PRIM_DIR
SUBSTR (TRIM(:P999_OWSR), INSTR (TRIM(:P999_OWSR), ' ', 1)) PRIM_SUF
......................................................
....................

on the line below

SUBSTR (TRIM(:P999_OWSR), INSTR (TRIM(:P999_OWSR), ' ', 1)) PRIM_SUF


Does anyone have a solution how to escape single quotes in Oracle APEX 4.2. -as-' or something? I tried to use the slash reverse but had no luck.

Would really appreciate your help as soon as POSSIBLE.

Thank you
RADs

RADs wrote:

Does anyone have a solution how to escape single quotes in Oracle APEX 4.2. -as-' or something? I tried to use the slash reverse but had no luck.

String in Oracle Liberals quotes are escaped by doubling them:

execute immediate 'update emp set sal = sal * 1.2 where ename = ''SCOTT''';

However, a better approach when dealing with channels SQL is to resort to the alternative citing:

execute immediate q'{update emp set sal = sal * 1.2 where ename = 'SCOTT'}';

because it allows the original string must remain unchanged.

Tags: Database

Similar Questions

  • With the help of TWG instead of Collections of Oracle APEX

    Hello

    I use Oracle APEX v.4.2 and wanted to see if there were problems with the use of global temporary Tables (GTT) on Oracle APEX Collections. I remember reading another post here that mentioned that there are problems with the session ID and TWG.

    Basically, I want to call a procedure of package from dynamic action where this procedure will perform a form any treatment and insert records into a TWG, which I would then use to dial from a classic APEX SQL report. I seeks to implement the TWG to preserve the lines and run an EXECUTE IMMEDIATE 'TRUNCATE TABLE TWG' within the APEX statement.

    Can someone pls let me know of any problems with the above scenario or I better stick to the Collections of the APEX.

    Hope to hear from someone soon on the above and, possibly, examples of use of TWG in a similar way.

    Thank you.

    Tony.

    You cannot use with APEX, since TWG is bound to a specific database session (aka connection)-> see DECLARE GLOBAL TEMPORARY TABLE statement

    As with APEX you can (and will) get a different Session DB for each load/submit/ajax-call of a page, you will never see the TWG previously created again.

    Peter

  • How to create a collection of apex to store and to loop through the values

    I couldn't find a simple example to do
    Apex 4.2

    I need to create a collection of the apex. I have a query that returns multiple roles for a user. I need to check to see if one of my values of point is within the collection, but I'm not sure how. So far, I have:

    Start
    APEX_COLLECTION. () CREATE_COLLECTION
    p_collection_name = > 'ALL_ROLES');

    Select count (granted_role) in the County of dba_role_privs where upper (grantee) = upper(:APP_USER);

    end;

    How would store the query results in the collection?

    Even shorter

    declare
      v_count number;
    begin
      if :P32_SUBMISSION_DATE is null
      then
        return false;
      end if;
      select count(*) into v_count
      from dba_role_privs
      where upper(grantee) = upper(:APP_USER)
      and  granted_role in ('SURVEY_SUID','SURVEY_JOB_SUID');
    --
      return v_count > 0;
    end;
    

    Note that with a combined function as count you will never get an exception no_data_found

  • Error of the ACLs in Oracle Apex 5 after schema change

    Hi all

    I'm creating an application using Oracle Apex 5.

    I have a button call Send Mail and mail is worked.

    Now, I imported my request in a different schema and configured acl as below.

    I use apex_mail.send to send mail and created the acl as

    BEGIN

    () DBMS_NETWORK_ACL_ADMIN.drop_acl

    ACL = > 'open_apex.xml');

    (DBMS_NETWORK_ACL_ADMIN). CREATE_ACL

    ACL = > "open_apex.xml"

    Description = > "a test of the ACL feature."

    main = > 'RMSR. "

    IS_GRANT = > TRUE,

    privilege = > 'connection ',.

    start_date = > SYSTIMESTAMP,

    End_date = > NULL);

    (DBMS_NETWORK_ACL_ADMIN). ASSIGN_ACL

    ACL = > "open_apex.xml"

    Home = > ' *',

    lower_port = > 20,

    upper_port = > 9999);

    COMMIT;

    end;

    BEGIN

    (DBMS_NETWORK_ACL_ADMIN). ADD_PRIVILEGE

    ACL = > "open_apex.xml"

    main = > 'RMSR. "

    IS_GRANT = > TRUE,

    privilege = > 'connection ',.

    position = > NULL,

    start_date = > NULL,

    End_date = > NULL);

    COMMIT;

    END;

    It throws error as

    ORA-24247: network access denied by access control list (ACL)

    Is there a problem in my setup?

    Thanks in advance,

    Su.GI

    Hi Su.gi,

    Su.GI wrote:

    I'm creating an application using Oracle Apex 5.

    I have a button call Send Mail and mail is worked.

    Now, I imported my request in a different schema and configured acl as below.

    It throws error as

    ORA-24247: network access denied by access control list (ACL)

    Is there a problem in my setup?

    You have granted the ACL to the RMSR of your database schema, so it is necessary for the APEX_050000 scheme when you use the APEX_MAIL package.

    This is why the ACL must be granted at the APEX 5 Schema: https://docs.oracle.com/cd/E59726_01/install.50/e39144/listener.htm#HTMIG29161

    Here's how the ACL must be granted for APEX 5 Schema: https://docs.oracle.com/cd/E59726_01/install.50/e39144/listener.htm#HTMIG29162

    NOTE:

    • Create the ACL by logging into the user with SYSDBA SYS privileges.
    • Don't forget to validate after execution of the anonymous block for the creation of ACL.

    Kind regards

    Kiran

  • Oracle apex and extjs grid table

    Hello

    IM new to extjs and I was wondering if anyone can help me with this.
    I want to create a report in oracle apex and place the output in the extjs grid table
    for example, I want to display the output of select * from object in table grid

    thnx in advance
  • Creating a collection of a query at the Apex 4.2 is not complete the data in the collection.

    I have a process that creates a collection with data from several tables. The query returns multiple lines in the tab "Sql commands". The same query is used to create the collection 'Head before' and when I create a region with the source of the region as

    Select * from apex_collections where collection_name = "load_dashboard";

    At the time of the rendering of the page, shows me "no data found".

    What could be the problem? Are there requirements before creating the collection?

    Thanks in advance,

    Sriram

    Name of the collection must be uppercase. That's your problem.

    Denes Kubicek

    -------------------------------------------------------------------

    http://deneskubicek.blogspot.com/

    http://www.Apress.com/9781430235125

    https://Apex.Oracle.com/pls/Apex/f?p=31517:1

    http://www.Amazon.de/Oracle-Apex-XE-Praxis/DP/3826655494

    -------------------------------------------------------------------

  • Create the Signature buffer in oracle apex 5.0

    Hello, I'm trying to create the signature buffer in oracle apex 5.0, did see some plugins for that as: https://www.enkitec.com/products/plugins/signaturepad/help can I implement the same functionality without using this plugin. What I see: 1) http://keith-wood.name/signature.html 2) https://github.com/brinley/jSignature ) 3 https://github.com/thomasjbradley/signature-pad/blob/gh-pages/documentation.md Point is to make this cushion where I sign! and also save as image in database. Don't know if I'm clear enough with my question or not. Thank you.

    Hi Pranav.shah,

    Pranav.Shah wrote:

    Hello, I'm trying to create the signature buffer in oracle apex 5.0, did see some plugins for that love: https://www.enkitec.com/products/plugins/signaturepad/help can I implement the same functionality without using this plugin. What I see: 1) http://keith-wood.name/signature.html 2) https://github.com/brinley/jSignature 3) https://github.com/thomasjbradley/signature-pad/blob/gh-pages/documentation.md Point is to make this cushion where I sign! and also save as image in database. Don't know if I'm clear enough with my question or not. Thank you.

    Use the pad of Signature plugin Enkitec. Why don't you use this plugin, but only its features.

    Also, the plug-in can save the signature to be registered as JSON CLOB or BLOB image in the database.

    Reference:

    Kind regards

    Kiran

  • How do for elements to create the shuttle cascading in Oracle Apex

    Can everyone please create me Articles of the shuttle in cascade in the oracle apex.

    The same way as you do that for selection only lists the condition is a little different. Here is an example of the second Shuttle in my case:

    SELECT pcat_title d, pcat_id r

    FROM (SELECT pcat_id, pcat_title, pcat_pt_code

    Of om_prod_categories

    WHERE pcat_parent_id IS NULL)

    WHERE INSTR (': ' |: p3_prod_pt_code |) ':',

    ':' || pcat_pt_code | ':') > 0

    Denes Kubicek

  • Oracle Apex 4.2.4 cannot create PDF

    I can't create PDF reports through the use of Apex.

    (1) I have installed Oracle XE, upgrade the application Express of Apex 4.2.4.00.08

    (2) in the print report Listener Oracle APEX value Instance settings

    (3) established a basic report of the emp demo table

    (4) set to allow reporting printing = 'yes '.

    When I run the report and select pdf I get error message not a pdf file is valid.

    Open the file in wordpad and it contains, given therefore seems not to be conversion from XML to PDF format below.  Any ideas what I am doing wrong! :

    <? XML version = "1.0" encoding = "UTF-8"? >

    < apexListnerFOP >

    < DOCUMENT >

    < DATE > 07/03/2014 < / DATE >

    STAFF of < user_name > < / username >

    < > 101 APP_ID < / APP_ID >

    Ridgway library < APP_NAME > < / APP_NAME >

    < > 12 PAGE_ID < / PAGE_ID >

    Report < TITLE > 1 < /title >

    < REGION ID = "2221822669173184" >

    rowset <>

    < ROW >

    < > 7369 EMPNO < / EMPNO >

    SMITH < ENAME > < / ENAME >

    CLERK of < JOB > < / JOB >

    < MGR > 7902 < / MGR >

    < HIREDATE > 17/12/1980 < / HIREDATE >

    < > 800 SAL < / SAL >

    < COMM > < / COMM >

    < DEPTNO > 20 < / DEPTNO >

    < / ROW >

    The issue was the auditor of the Apex.  I didn't properly configure it.

    I've recreated the service ensuring that account APEX_PUBLIC_USER has been unblocked and APEX static resources highlighted in apex/pictures folder.

    Now works.

  • How to create the image button in apex oracle 3.1

    Hello

    I am new to oracle apex.

    I would like to show button called delete as an icon of image for the same thing that I saved the attributes of the button as shown below

    Button = Image Style

    Button Image #WORKSPACE_IMAGES #delete_row_64.gif

    But this isn't no image showing, as image not available.

    Please someone help me how to solve this issue

    Helpe me please where should I keep the images that I can use as an icon of the image to the page element.

    Thank you and best regards,
    Ibrahim Sayyed.

    You must download the image in for the shared components

    Gus

  • Execution of the procedure of Oracle APEX

    Hello

    I've written a procedure ' create or replace PROCEDURE process_csvfile (p_filename IN VARCHAR2); " et I want to execute this procedure to Oracle Apex.


    PROCEDURE:

    create or replace PROCEDURE process_csvfile(p_filename IN VARCHAR2)
    AS
    statement1 varchar2(1000);
    statement2 varchar2(1000);
    statement3 varchar2(1000);
    
    begin
    dbms_output.put_Line(p_filename );
    statement1:= 'alter table adb.external_bcc_test location ( '  ||chr(39)|| p_filename||chr(39)|| ')' ;
    dbms_output.put_line(statement1);
    EXECUTE immediate statement1;
    dbms_output.put_line('statement1-> completed');
    EXECUTE immediate 'truncate table ADB.ADB_BCC_TEST';
    dbms_output.put_line('statement2-> completed');
    statement3:='insert /*+ append */ into ADB.ADB_BCC_TEST(BCC_ID,BCC_ADD,"NO_OF_BCC(GEO)") select * from adb.external_BCC_test';
    dbms_output.put_line(statement3);
    EXECUTE immediate statement3;
    dbms_output.put_line('statement3 insert-> completed');
    
    EXCEPTION
    WHEN OTHERS
    then
    raise;
    END;
    
    

    I created the button and the action as a dynamic Action where I wrote below PL/SQ as dynamic Action to perform this procedure


    BEGIN
    
    process_csvfile;
    END;
    
    


    But I get an error" " " ORA-06550: line 4, column 3: PLS-00306: wrong number or types of arguments in the call to 'PROCESS_CSVFILE' ORA-06550: line 4, column 3: PL/SQL: statement ignored (go to error) "

    Oracle Apex Version: 4.2.1

    Thank you

    BO.

    BO123 wrote:

    I've written a procedure ' create or replace PROCEDURE process_csvfile (p_filename IN VARCHAR2); " and I want to run this procedure from Oracle Apex.

    1. create or replace PROCEDURE process_csvfile (p_filename IN VARCHAR2)
    2. AS
    3. statement1 varchar2 (1000);
    4. statement2 varchar2 (1000);
    5. statement3 varchar2 (1000);
    6. Start
    7. dbms_output.put_Line (p_filename);
    8. statement1: = ' change the location of the table adb.external_bcc_test (' |) Chr (39) | p_filename | Chr (39) | ')' ;
    9. dbms_output.put_line (statement1);
    10. EXECUTE immediate statement1;
    11. dbms_output.put_line ('end statement1->');
    12. EXECUTE immediate ' truncate table ADB. ADB_BCC_TEST';
    13. dbms_output.put_line ('end of reporting2->');
    14. statement3: = "insert / * + append * / into ADB." ADB_BCC_TEST (BCC_ID, BCC_ADD, ' NO_OF_BCC (GEO) ') select * from adb.external_BCC_test';
    15. dbms_output.put_line (statement3);
    16. EXECUTE immediate statement3;
    17. dbms_output.put_line ('end statement3 insertion->');
    18. EXCEPTION
    19. WHILE OTHERS
    20. then
    21. lift;
    22. END;

    The treatment is an external table. How to get the source file in the specified location?

    dbms_output.put_linethe instrumentation is unnecessary in an environment of APEX (unless the apex_debug.log_dbms_output method has been called). Use apex_debug API methods instead so that information is available in debug mode.

    There is no reason to use dynamic SQL statements in lines 15-17.

    Creating a column named "NO_OF_BCC (GEO)" is not a good idea and is in conflict with the recommendation of the Oracle do not use identifiers in quotes for the names of database objects. This objects will only cause problems and confusion.

    Lines 20 to 23 are a bug. It doesn't hide where any exception occurred in fact. If there is no specific exception that must be handled in this procedure, it should not contain an exception block.

  • Create the Collection with shuttle

    It's using Apex 3.2

    I have a shuttle, and I need to create a collection based on the values of the shuttle.

    I try to use APEX_COLLECTION. CREATE_COLLECTION_FROM_QUERY_B, but keep a mistake.

    My code is

    BEGIN

    IF apex_collection.collection_exists ('VPE_STORE_GROUP_COL') = TRUE THEN

    apex_collection.delete_collection (p_collection_name = > 'VPE_STORE_GROUP_COL');

    END IF;

    APEX_COLLECTION. () CREATE_COLLECTION_FROM_QUERY_B

    p_collection_name = > 'VPE_STORE_GROUP_COL ',.

    p_query = > ' select CLOCKEY, GRPKEY, substr(GRPLONGDESCR,1,50), GRPTYPEKEY,.

    substr (GRPTYPELONGDESCR, 1, 50), CLOCID, CLOCGRPID, LDEID

    of v_vpe_bas_cloc2clocgrp

    where IN CLOCGRPID (: P32_SHUTTLE)

    GRPKEY, GRPTYPEKEY, CLOCKEY order ');

    END;

    I have this like we charge before procedure header, but I get the error

    ORA-20104: create_collection_from_query_b error: ORA-20104: create_collection_from_query ExecErr:ORA - 01008: not all variables

    Can someone tell me where I'm wrong

    Gus

    Hello

    Can you reproduce this on apex.oracle.com ?

    Kind regards
    Jari

  • Create the Collection job DBMS

    Any of you have ever tried to create a collection in a job started from a session authenticated apex?

    I know I have to configure the session information in the work:
    apex_custom_auth.define_user_session
    apex_application.g_flow_id
    apex_custom_auth.post_login

    But I can not fire the last of them outside the context of the APEX (in work). Someone at - he never accomplished this? The purpose is collection will be available for the session of the APEX for the user does not have to wait for the moment wherever they come to the page on which it is used.

    Jeff

    You need not use a dbms_job for this. An asynchronous ajax call allows you to do this and create a collection in an application on the application process.

    Denes Kubicek
    ------------------------------------------------------------------------------
    http://deneskubicek.blogspot.com/
    http://www.Opal-consulting.de/training
    http://Apex.Oracle.com/pls/OTN/f?p=31517:1
    ------------------------------------------------------------------------------

  • 2012R2 creating a Collection server and adding RDSH completed with errors

    I'm working on the construction of a farm of RDS 2012R2 to be used by thin clients to my installation. I have a farm complete 2008R2 already working and I'm looking to upgrade. Currently, I have 2-2012R2 servers rose with RDS services installed. I assigned Server 1 as the agent of connection and the Desktop Web access server remotely. Server 2 is configured as host of the session. The installation of all the roles of RDS was successful. I configured the gateway desktop remotely, RD, RD Web Access licenses and certificates on my RD connection Broker.

    Initially, I tried to create a collection while the two servers were in my terminal server OR. After many attempts to try to create a session and a lot of research, I found that the GPO settings for RDS servers should be irreversible in order to create a collection with a host of the session. I moved the two servers to a political ORGANIZATION unit block I put in place. I ran a gpupdate/force and restarted both servers. In addition to this, I waited a few hours to ensure that policies no longer apply. I tried to create a collection again and received the same error when it was adding the session host server"SERVER 2 failed to configure the Server Desktop Session host Server 2 remotely. Invalid operation. "I ran a gpupdate/force a few times and tried to create a collection of more than a few times without success. Finally, I deleted all the two servers RDS servers and then reinstalled again. After having everything set up (bridge, Broker for connections, licenses, certificates etc), I try to create a collection again and am greeted with the same error.

    I know that the GPO settings have been deleted because I no longer see the banner of society that is displayed when you log on the server. There are 0 policies applied to this ORGANIZATION and the legacy unit is blocked. I'm not really sure of who apply now. I hope that someone else has experienced this problem and can help you. Thank you

    J

    Hello

    Your question is beyond the scope of what is generally answered in this forum of consumer and would be better suited for the IT Pro TechNet public.

    Please post your question in the TechNet Forums.

    https://social.technet.Microsoft.com/forums/Windows/en-us/home?Forum=w8itpronetworking

    TechNet is watched by other computing professionals who would be more likely to help you.

    Thank you

  • Progressively display areas in Oracle Apex 5.0 (universal theme)

    Hello, what I am trying to achieve:
    https://apex.oracle.com/pls/apex/f?p=63709:1:2676260562286:

    So basically I have 3 region on page load all regions must be hidden, after that the user click on the button (Let's Say ADD_REGION) first region will appear on new clicks of the user on the same button second region indicated even for the third.

    in the link above I created a region called JavaScript_Working in HTML.
    I want something even for areas of oracle apex.

    Tried:

    (1) based on the ID of a region I created a DA who will hide the region during the loading of the page, but after clicking on the button it does not return.

    (2) Css: inline Css section of a page where I had called Display: none with region Id prefix.

    (3) javascript: get Null drop back so this idea.

    Any advice will be good enough.

    Always:

    Identification information: new_b/new_b/new_b

    App: Apex_Community

    ID: 63709

    page: 1

    Thank you.

    This function added

    function check_then_show(p_region) {
    
        if ($(p_region).css('display') === 'none') { // if  hidden
          $(p_region).show(); //  show
          return true;
        }
        return false; // keep looking for next region
    
    }
    

    and this at the click of a button

    if (check_then_show('#region1')) {}
    else if (check_then_show('#region2')) {}
    else if (check_then_show('#region3')) {}
    

    That will keep test in the order provided.

    Looks like you were something already to help the regions of catalog, you would like to combine? It was just the first idea that worked

Maybe you are looking for

  • Need recovery disc for 6910p.

    How can I buy HP recovery discs? Thanks for any help.

  • Satellite A210-SP6812 hangs after hibernation with a Wi - Fi connected

    I have a Satellite A210-SP6812 running with win XP SP3, and when I turn into suspend mode and later he attends the hibernation (I have the choice in Toshiba energy saving) it will, but after that you will wake up never the system again unless you res

  • Pavilion TouchSmart 11 - e 110nr: could not find my TouchSmart 11 laptop battery

    I have HP Pavilion TouchSmart 11-e110nr; 64-bit Windows 8.1, which is only a year old.  I get a message that my battery capacity is low and now I need to get a replacement of the battery.  But my problem is that I can't find anyone who has for my typ

  • 500 516nc: GPu 500-516nc

    Hello can I replace my Nvidia GPU with MSi 960GTX 745GTX? I know, I need replace my food at least 400W. But I need to know if the card can adapt. And Im afraid put block more powerful power supply. Is it scalable? Obtained: I5-4460 CPU 3.2 Ghz Quadro

  • Print duplex on Mac problems

    I don't seem to be able to find an option button in the printer settings in Mavericks to allow the paper to flip on the long side. There is a checkbox to print double-sided, print B & W and nothing else. I don't have this problem with my computer Win