A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/pmd/pmd/issues/2008 below:

[plsql] In StringLiteral using alternative quoting mechanism single quotes cause parsing errors · Issue #2008 · pmd/pmd · GitHub

Affects PMD Version: 6.17.0

Rule: n/a

Description:
When using (multiline) StringLiterals with a custom start and end delimiter (alternative quoting mechanism), then you currently cannot use the single quote character within that literal.

Syntax is described here: https://docs.oracle.com/en/database/oracle/oracle-database/18/sqlrf/Literals.html#GUID-1824CBAA-6E16-4921-B2A6-112FB02248DA

Code Sample demonstrating the issue:

declare

  literal1 clob := q'!name LIKE '%DBMS_%%'!';
  literal2 clob := q'{SELECT * FROM employees WHERE last_name = 'Smith';}';
  literal3 clob := q'% test'test %';

  -- works
  literal1a clob := q'! test !';
  literal2a clob := q'{
    also multiple
    lines
  }';
  literal3a clob := q'% test abc %';

begin
  null;
end;
/

Running PMD through: Designer


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4