Home
Newline and control characters should not be used in string literals
Rule description
- Newline and control characters should not be used in string literals
Non-compliant Code Example
SELECT
/*
Customer table is for holding customer data such as Name, Address, etc.
Also it contains some crucial information like Credit limit, amount spent etc.
*/
NAME,
ADDRESS,
CREDIT_LIMIT
FROM
CUSTOMERS
Where ADDRESS like '%LAKE% --Non compliant code (Newline and control characters used in string literals)
VIEW%';
Compliant Code Example
SELECT
/*
Customer table is for holding customer data such as Name, Address, etc.
Also it contains some crucial information like Credit limit, amount spent etc.
*/
NAME,
ADDRESS,
CREDIT_LIMIT
FROM
CUSTOMERS
Where ADDRESS like '%LAKE%' || chr (10) || 'VIEW%'; -- Compliant code (Newline and control characters used in string literals)