Print Thread
PLD 11 Parsing problem with concatenated string literals
#51065 03/20/15 11:59 AM
Joined: May 2011
Posts: 37
L
Member
OP Offline
Member
L
Joined: May 2011
Posts: 37
Problem occurs in PL/SQL Developer (Version 11.0.0.1762) running on Windows 7 (64-bit) 6.1 Build 7601 (Service Pack 1).

Test case:

SQL Query
CREATE OR REPLACE PACKAGE test_string_literals as

  procedure test;
  
end test_string_literals;
/

CREATE OR REPLACE PACKAGE BODY test_string_literals as

  procedure test
  is
    dummy varchar2(200);
  begin
    dummy := q'#'foo#'||q'#'bar'#';
  end;

end test_string_literals;
/

With code presented above:
  1. In Command Window parsing error is visible in line 14th (wrong colors used).
  2. After running script and opening Program window with package body:
    • The same problem occurs in 7th line of body.
    • Code contents is not visible.

The problem is caused by apostrophes immediately preceding or succeeding quotation marks in conjunction with concatenation. It works as desired if quote delimiter would be some kind of parenthesis.

Lukasz



Best regards,
Lukasz
Re: PLD 11 Parsing problem with concatenated string literals
Lukasz Indeka #51079 03/20/15 08:17 PM
Joined: Sep 2009
Posts: 197
Krakow, Poland
Member
Offline
Member
Joined: Sep 2009
Posts: 197
Krakow, Poland
This thread is probably related:
Re: Syntax highlighting and alternate quote notation

It looks like the SQL Developer accepts only the special quoting characters (that have a "symmetrical" closing character), where Oracle accepts any character for quoting.


Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.033s Queries: 14 (0.012s) Memory: 2.5028 MB (Peak: 3.0427 MB) Data Comp: Off Server Time: 2024-05-18 22:52:21 UTC
Valid HTML 5 and Valid CSS