Home » SQL & PL/SQL » SQL & PL/SQL » problem with set escape /
problem with set escape / [message #274874] Wed, 17 October 2007 09:03 Go to next message
soujanya_srk
Messages: 111
Registered: November 2006
Location: HYDERABAD
Senior Member
i have an anyonymous block


SET DEFINE ON
--SET FEEDBACK OFF
SET serverout ON SIZE 999999
SET VERIFY OFF

-- set escape /
DEFINE p_default = 'ALL';
@wcm_metavante_interface_provider.sql

declare
    cursor c_prv_info is select prv_id from prv_info where prv_name = 'Shared Provider' order by prv_id ;
BEGIN
    FOR r_prv_info in c_prv_info LOOP
        BEGIN
            INSERT INTO PRV_PROPERTIES 
            ( PRV_ID, SERVICE_ID, CATEGORY, FILE_NAME, PROPERTY_NAME, CURRENT_VALUE, DATA_TYPE, DESCRIPTION, HELP_URL, DEFAULT_VALUE, VALUE_LIST, CREATED_DATE, EDITED_DATE, CONTROL_TYPE ) 
            VALUES 
            (r_prv_info.prv_id, 1, 'Metavante Configurations', 'metbillpay.metbillpay', 'METAVANTE_CUSTOMER_SERVLET', '/MetBillPay/MetBillPay',
	    'Text', null, NULL, '/MetBillPay/MetBillPay', NULL,  sysdate, NULL, 2); 
            DBMS_OUTPUT.PUT_LINE('Added Property: METAVANTE_CUSTOMER_SERVLET');
        EXCEPTION
            WHEN DUP_VAL_ON_INDEX THEN
                DBMS_OUTPUT.PUT_LINE('Updating Property: METAVANTE_CUSTOMER_SERVLET');
                UPDATE PRV_Properties SET
                CATEGORY = 'Metavante Configurations', 
                DATA_TYPE = 'Text', 
                DESCRIPTION = null, 
                HELP_URL = '', 
                CONTROL_TYPE =2
                WHERE Prv_ID = r_prv_info.prv_id 
                AND FILE_NAME = 'metbillpay.metbillpay' 
                AND PROPERTY_NAME = 'METAVANTE_CUSTOMER_SERVLET';
        WHEN OTHERS THEN
        DBMS_OUTPUT.PUT_LINE('Error Inserting Property: METAVANTE_CUSTOMER_SERVLET'||SUBSTR(SQLERRM,1,100));
        END;

     BEGIN
            INSERT INTO PRV_PROPERTIES 
            ( PRV_ID, SERVICE_ID, CATEGORY, FILE_NAME, PROPERTY_NAME, CURRENT_VALUE, DATA_TYPE, DESCRIPTION, HELP_URL, DEFAULT_VALUE, VALUE_LIST, CREATED_DATE, EDITED_DATE, CONTROL_TYPE ) 
            VALUES 
            (r_prv_info.prv_id, 1, 'Servlet Path', 'metbillpay.metbillpay', 'METBILLPAY_SSO_SERVLET', '/metbillpay/MetBillPaySSO',
             'Text', 'MetBillPay SSO Servlet URI', NULL, '/metbillpay/MetBillPaySSO', NULL,  sysdate, NULL, 0); 
                
            DBMS_OUTPUT.PUT_LINE('Added Property: METBILLPAY_SSO_SERVLET');
        EXCEPTION
            WHEN DUP_VAL_ON_INDEX THEN
                DBMS_OUTPUT.PUT_LINE('Updating Property: METBILLPAY_SSO_SERVLET');
                UPDATE PRV_Properties SET
                CATEGORY = 'Servlet Path', 
                DATA_TYPE = 'Text', 
                DESCRIPTION = 'MetBillPay SSO Servlet URI', 
                HELP_URL = NULL, 
                CONTROL_TYPE =0
                WHERE Prv_ID = r_prv_info.prv_id 
                AND FILE_NAME = 'metbillpay.metbillpay' 
                AND PROPERTY_NAME = 'METBILLPAY_SSO_SERVLET';
        WHEN OTHERS THEN
        DBMS_OUTPUT.PUT_LINE('Error Inserting Property: METBILLPAY_SSO_SERVLET'||SUBSTR(SQLERRM,1,100));
        END;


blah blah

blah blah

SET DEFINE ON 
commit;





now when i run this code , in PRV_PROPERTIES table,
for the property 'METBILLPAY_SSO_SERVLET',

i am getting value for current_value as metbillpayMetBilPaySSO
meaning, i am not getting the / which i included in data

can anyone suggest me what to do? which set commands i need
to put to get / in my table data?


Re: problem with set escape / [message #274891 is a reply to message #274874] Wed, 17 October 2007 10:52 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Don't use "set escape /":
SQL> create table t (val varchar2(10));

Table created.

SQL> insert into t values ('/');

1 row created.

SQL> select * from t;
VAL
----------
/

1 row selected.

Regards
Michel
Re: problem with set escape / [message #274896 is a reply to message #274874] Wed, 17 October 2007 10:56 Go to previous message
Frank
Messages: 7880
Registered: March 2000
Senior Member
Did you run it previously (in the same sqlplus-session) with the line "set escape /" uncommented?

Then you have to unset it first. Commenting the line only prevents from setting it again (to the same value).
So either unset it or start a new session.
Previous Topic: ora-02063
Next Topic: select using rownum
Goto Forum:
  


Current Time: Sat Dec 03 09:53:02 CST 2016

Total time taken to generate the page: 0.06631 seconds