1

I have a requirement where i need to amend the 1500 records. There are some fields in random ,of the where clause has an & as mentioned below:

    update abc where col1='AL_ATRADE_P&L_RP'

I just wanted to execute the 1500 udpate queries as a script and TOAD prompts me for the variable to be entered. If i just press enter the udpate query is taken as below:

    update abc where col1='AL_ATRADE_P'

But in actual my record has a collumn with name 'AL_ATRADE_P&L_RP'

Any suggestion to get rid of this?

user2075017
  • 457
  • 4
  • 11
  • 23

2 Answers2

2

in TOAD right click on the SQL window, and you should see an option that is ticked "Prompt for substitution variables". Un-tick this, and TOAD Will not try to replace the ampersand any more.

enter image description here

DazzaL
  • 21,638
  • 3
  • 49
  • 57
0

Adding to Dazzal answer. The same can be done in sqlplus by just using the below: SET DEFINE OFF; This is same as setting the prompt for substitution variables to none in TOAD. Just thought of sharing this with you all

user2075017
  • 457
  • 4
  • 11
  • 23