rspec/rules/S3767/cobol/rule.adoc

20 lines
684 B
Plaintext
Raw Normal View History

2021-04-28 16:49:39 +02:00
``++CAST(... AS CHAR/VARCHAR)++`` can be a source of incompatibilities between database versions: the behavior of ``++CAST++`` may not be the same depending on the version of the database system. Such incompatibilities can cause unexpected output from applications that ``++CAST++`` decimal data to ``++CHAR++`` or ``++VARCHAR++``, it's therefore best to avoid using ``++CAST(... AS CHAR/VARCHAR)++``.
2021-04-28 16:49:39 +02:00
== Noncompliant Code Example
----
DELETE product
WHERE CAST(status_code AS CHAR(2)) = '42' -- Noncompliant
----
ifdef::env-github,rspecator-view[]
'''
== Comments And Links
(visible only on this page)
include::comments-and-links.adoc[]
endif::env-github,rspecator-view[]