How to use keyword in a sentence?

Feb 1 2011 1:04 AM


I am calculating the length of a sentence using Length (scalar function), then I also used that keyword in the sentence, but I am having an error for all the queries below:


                              Error: Missing right parenthesis.

1-SELECT LENGTH('This sentence's length will be calculated') "Length of characters"
FROM dual;

2- SELECT LENGTH('This sentence's 'length' will be calculated') "Length of characters"
FROM dual;

3- SELECT LENGTH('This sentence's "length" will be calculated') "Length of characters"
FROM dual;

4-SELECT LENGTH('This sentence's "\length\" will be calculated') "Length of characters"
FROM dual;


5- SELECT LENGTH('This sentence's '\length\' will be calculated') "Length of characters"
FROM dual;

What should be the correct way to write this query?

Thanks in advance


Answers (8)