0
If this query got resolved then please Accept the post that helped you as Answer.
So other members can easily find the answers.
0
Sayed,
As you said "
I want to learn, how to be a good programmer. ", did you tried to explore why the error came up.
No, but you got a reply with sql statement and you copy paste that statement into editor and executed, you got the o/p.
I posted clearly, to escape single quote you need to use double quotes or two single quotes.
This is how people learn, from errors, mistakes etc...
0
Your reply was not clear as you just wrote
use
" (double quotes)
or '' (two single quotes)
to escape single quote
where, when & how to use it? If you would have write the query using quotes, It would have been better for a novice like me.
0
so you didnt see my post reply?
0
1- The query below worked fine:
SELECT LENGTH('This sentence''s length will be calculated') "Length of characters"
FROM dual;
Your query had Len instead of length which gave "Invalid Identifier" error.
2- The good point of your reply was single quote after sentence word along with its apostrophe, I got it from there, but it took time as you did not defined it.
0
SELECT LEN('This sentence''s length will be calculated') 'Length of characters'
0
SELECT len('This sentence''s length will be calculated') "Length of characters" FROM dual
This is the right way
0
use " (double quotes) or '' (two single quotes) to escape single quote