Home » SQL & PL/SQL » SQL & PL/SQL » problem with set define off
problem with set define off [message #266329] Mon, 10 September 2007 09:50 Go to next message
soujanya_srk
Messages: 111
Registered: November 2006
Location: HYDERABAD
Senior Member
i have a piece of code, where while inserting data into a
table, in the values i encounter an '&'

i have included "set define off" to avoid being asked for
a value

but i am also calling another script @functionality_name.sql

where i define a variable which is nothing but

"'&l_funct_name'"

please find the script below, now how to make sure that I
get the value correctly by calling @functionality_name.sql

and at the same time , avoid prompting to enter a value

for "'/pay/ipay/IPay?cmd=ssopost&mode=user'" below?


set define off

set define off

SET head off echo off termout ON feedback off verify off linesize 80

SET serveroutput ON SIZE 999999

@functionality_name.sql


DECLARE

   n_funct_name   function.name%type := '&l_funct_name';

BEGIN

 

    INSERT INTO Function

    ( blah, blah  )

    VALUES

    (10010,

    '&n_funct_name',

    '&n_funct_name',

    '',

    '0',

    '8',

    '',

    '1',

    '',

    '0',

    '0',

    '',

    '0',

    --'/framework/RedirectorServlet?id=10000', --patch9

    '/pay/ipay/IPay?cmd=ssopost&mode=user', --for patch11

);



shall i use escape..? but even if i use escape..i think
define will override it?

Re: problem with set define off [message #266335 is a reply to message #266329] Mon, 10 September 2007 10:21 Go to previous messageGo to next message
Cthulhu
Messages: 381
Registered: September 2006
Location: UK
Senior Member
You could use a different value for the define character e.g.

set define ^
Re: problem with set define off [message #266376 is a reply to message #266329] Mon, 10 September 2007 12:20 Go to previous message
joy_division
Messages: 4641
Registered: February 2005
Location: East Coast USA
Senior Member
set scan off
Previous Topic: loop error
Next Topic: Significance of 'last' in oracle.
Goto Forum:
  


Current Time: Wed Dec 07 12:34:00 CST 2016

Total time taken to generate the page: 0.13924 seconds