Links

MSCEWI2041

TRUNC added to ensure integer. May need changes if not numeric or string.

Severity

Low

Description

TRUNC function was added to ensure INTEGER. It may need changes if not NUMERIC of STRING.

Example Code

Input Code:

SELECT
cast(T_2041.integer_column as integer);

Output Code:

SELECT
cast(TRUNC(T_2041.integer_column) as integer) /*** MSC-WARNING - MSCEWI2041 - TRUNC FUNCTION WAS ADDED TO ENSURE INTEGER. MAY NEED CHANGES IF NOT NUMERIC OR STRING. ***/;

Recommendations

  • Review whether the type is either NUMERIC or STRING, since it may need changes.
  • If you need more support, you can email us at [email protected]