org.sonar.l10n.plsqlopen.rules.plsql.ConcatenationWithNull.html Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of zpa-checks Show documentation
Show all versions of zpa-checks Show documentation
Z PL/SQL Analyzer :: Checks
The newest version!
Concatenating a VARCHAR2 value with NULL is no-op. So, the NULL value should be removed.
A concatenation of any other datatype with NULL will cause a implicit cast to VARCHAR2. If this is the desired behavior,
replace the concatenation by a TO_CHAR call to make the intention explicit. See this example:
var := NVL(''||id, 'Empty');
You should use this:
var := NVL(TO_CHAR(id), 'Empty');