Toad World® Forums

Toad 13.0.0.80 not handling correctly the q-operator for quoting strings


#1

Attempting to compile the below dummy procedure using q-operator for quoting strings:

CREATE OR REPLACE PROCEDURE testproc1 AS
v_Str VARCHAR2 (4000);
BEGIN
v_Str := q’| | a ‘Y’ |’;
END;

the procedure cannot be compiled raising error:
“PLS-00103 (6: 22): PLS-00103: Encountered the symbol “Y” when expecting one of the following:”

Same code is created correctly from Toad 12.12 or from Sql*Plus.

If we check the user_source we see that the fourth line has been saved as: " v_Str := ’ a ‘Y’ '; "
(i.e. without the q-operator), and this is the reason of compile error.

Apart the about example, new Toad 13.0.0.80 with q-operator strings cannot handle some greek characters.

New release cannot be used for developments with such issues with q-operator strings.

Thank you

jmavr


#2

There is a bug in one of our third party components. If the end quote delimiter appears anywhere within your string then the string is improperly terminated. In your example you use ‘|’ as your delimiter and ‘|’ also appears as part of the string content. The workaround is to use a different delimiter that does not appear in your string. In your example the following replacement will work… q’[ | a ‘Y’ ]’. This bug is said to be fixed in their next update which will be applied to Toad 13.1.

Thanks,

Michael


#3

The component update was available post-13.0 release. I’ve updated it and this issue is now resolved. It will be fixed in the next 13.1 beta (13.1.0.12) which will be released sometime next week.

Thanks,

Michael


#4

Thank you Michael,

Kindly note that this is NOT the only problem with the Editor. If some Greece characters exists in a string, the Procedure cannot be compiled. Check below example:

– result : Typ=96 Len=6: 206,181,206,175,207,137 CEB5CEAFCF89 είω
SELECT DUMP (‘είω’) xx1, RAWTOHEX (‘είω’) xx2, ‘είω’ yy FROM DUAL;

CREATE OR REPLACE PROCEDURE testproc1
AUTHID DEFINER
AS
v_Str VARCHAR2 (4000);
BEGIN
v_Str := q’|είω|’;
END;
/

Even though the first SELECT is executed correctly, the procedure (that has the same 3 Greek characters) creation fails with:

PLS-00103 (11: 15): PLS-00103: Encountered the symbol “3�3” when expecting one of the following

In Toad 12.12 the procedure could be compiled (even though some times when experimenting with these characters Toad was stuck and I had to kill the process)

Thank you

jmavr


#5

This is all related, I think. I’ve opened up a new ticket for this new issue.

Thanks,

Michael


#6

Dear Michael,

I download latest 13.1.0.13 Beta and both issues have been resolved.

Thank you

jmavr