Inserts with a TOracleScript

mknutsen

Member
Hi,

Im trying to execute the following with TOracleScript:

insert into table1(field) values('Text1 &Text2') ;

This results in that only "Text1" are inserted.

I change it to:
insert into table1(field) values('Text1 & Text2') ;

This is Ok !

I understand that this have something to do with definition of variables, but i don't set any variables.

Do TOracleScript scans for variables even if you not using it ?

Thanks

Morten
 
The variable is indeed implicitly declared if you use it in the script like this. I don't immediately see a work around other than concatenating the string:

'Text1 &' | | 'Text2'

------------------
Marco Kalter
Allround Automations
 
There should be an easy way to turn off substitution. This is very annoying when send web packages through (having < >, etc... replaced with a ;

Originally posted by mkalter:
The variable is indeed implicitly declared if you use it in the script like this. I don't immediately see a work around other than concatenating the string:

'Text1 &' | | 'Text2'

 
never mind, looking at the code, I see a \ prior to the ampersand will disable variable substitution (SET SCAN OFF of SQL*Plus has not effect.

Originally posted by startech:
There should be an easy way to turn off substitution. This is very annoying when send web packages through (having
 
Back
Top