SQL Editor does not recognise the q operator.
To reproduce the problem please follow the steps below:
1] Paste the procedure below into a Toad SQL Editor
create or replace procedure willi is
sSql varchar2(32000);
begin
sSql := q''Â
select * from dual
order by 11Â';
end willi;
/
2] Compile it
3] You will receive the following error message:
[Error] Syntax check (4: 11): ERROR line 4, col 11, ending_line 4, ending_col 11, Found 'q''Â
select * from dual
order by 11Â';
end willi;
/', Unbalanced string literal near end of chunk
[Error] Syntax check (8: 1): ERROR line 8, col 1, ending_line 8, ending_col 1,Expecting: ; -or- OR -or- AND -or- BETWEEN IN LIKE LIKE2 LIKE4 LIKEC MEMBER SUBMULTISET -or- -or- ! != < <= <> = > >= ^ ^= IS NOT -or- + - || -or- * / MOD REMAINDER -or- ** -or- ( (+) AT DAY MULTISET YEAR
Now go to Editor|Execute SQLvia SQL Plus
The procedure will be successfully created
If you go to Schema Browser|Procedure you will see that toad shows the procedure has valid.