Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: pl/sql and hochkommas
"Hubert Holler" <haiflosse_at_gmx.net> wrote in message
news:3fd422d4$0$19008$91cee783_at_newsreader02.highway.telekom.at...
|
| > >
| > > I'm not 100% sure I understand what you are asking.
| > > You might want to use the CHR() function in place of single or double
| > > quote marks.
| > >
|
| When I try:
| select count(*) into v_vorhanden from wort_suche where wort_id = v_id_wort
| and buchstabe = CHR(39) || upper(buchstabe) || CHR(39) and benutzer_id =
| login.getid_benutzer;
|
| it doesn't work but when I try:
|
| select count(*) into v_vorhanden from wort_suche where wort_id = v_id_wort
| and buchstabe = 'J' and benutzer_id = login.getid_benutzer;
|
| it does work.
|
| I hope someone can tell me the correct syntax for it.
|
| Thank a lot
|
| Hubert
|
|
|
what do you mean by 'it doesn't work'? are you getting an error message? or are you not getting the rows returned that you expect? as i mentioned in my other post, your expression "buchstabe = CHR(39) || upper(buchstabe) || CHR(39)" will never evaluate to true -- is that the problem?
note:
SQL> select ename, upper(ename), chr(39)||upper(ename)||chr(39)
2 from names
3 where ename like 'A%';
...
ENAME UPPER(ENAM CHR(39)||UPP
---------- ---------- ------------
ALLEN ALLEN 'ALLEN' Adams ADAMS 'ADAMS'
SQL> select ename, upper(ename), chr(39)||upper(ename)||chr(39)
2 from names
3 where ename = chr(39)||upper(ename)||chr(39);
no rows selected
![]() |
![]() |