Hi,
I'm trying to find out whether PLSQL has an escape character to indicate that the text following it should be taken as a literal.
To explain:
I want to use the following statement:
The way this reads at the moment, it would be parsed so that the contents of variable would be concatenated with '1' and compared to 'a value'.
What I want to happen is that the word variable is concatenated with '1' and then the contents of the variable variable1 is compared to 'a value'.
I'm convinced there's an escape character for this but I can't remember what it is and can't find it written down anywhere. Assuming the escape character was '&' then the code above would look like:
Then the contents of variable1 would be compared to 'a value'. Hope there is such a thing!
Cheers.
I'm trying to find out whether PLSQL has an escape character to indicate that the text following it should be taken as a literal.
To explain:
I want to use the following statement:
Code:
DECLARE
variable1 VARCHAR2 := 'a value'
BEGIN
IF variable || '1' = 'a value' THEN
The way this reads at the moment, it would be parsed so that the contents of variable would be concatenated with '1' and compared to 'a value'.
What I want to happen is that the word variable is concatenated with '1' and then the contents of the variable variable1 is compared to 'a value'.
I'm convinced there's an escape character for this but I can't remember what it is and can't find it written down anywhere. Assuming the escape character was '&' then the code above would look like:
Code:
DECLARE
variable1 VARCHAR2 := 'a value'
BEGIN
IF &variable || '1' = 'a value' THEN
Then the contents of variable1 would be compared to 'a value'. Hope there is such a thing!
Cheers.