Using binary operations with constants or parameters in queries.

Do not generate a template string using calculation or use string concatenation with the query language.

This requirement is based on some specifics of migrating applications to various database management systems.

Noncompliant Code Example

SELECT
    Products.Name AS Name,
    "My" + "Goods" AS Code
FROM
    Catalogs.Products AS Products;

SELECT
    Products.Name AS Name,
    "My" + &Parameter AS Code
FROM
    Catalogs.Products AS Products;

SELECT 
    Products.Name AS Name,
    FieldName AS Code
FROM
    Catalogs.Products AS Products
WHERE 
    FieldName LIKE "123" + "%";

Compliant Solution

SELECT
    Products.Name AS Name,
    "MyGoods" AS Code
FROM
    Catalogs.Products AS Products;

SELECT
    Products.Name AS Name,
    &Parameter AS Code
FROM
    Catalogs.Products AS Products;

SELECT 
    Products.Name AS Name,
    FieldName AS Code
FROM
    Catalogs.Products AS Products
WHERE 
    FieldName LIKE "123%";

See