Ambiguous Comments Validation


This validation step verifies if the entry code has a sequence of characters that may create ambiguous comments (/*/)

If the entry code has an ambiguous comment, a window with a warning is displayed like the next one:

Also, in the FileOutOfScope report, you will find information about the failed file (s).

Why is it ambiguous?

Block comments on SQL starts with /* and ends with */ . When the character sequence /*/ is used, depending on the source language, it can start a nesting inside the block comment, or finish the whole block.

Here is an example of valid statements using /*/

select col1,
  /*Some comment/*/ */*/

As you can see, the comment behaves differently in Teradata and SQL Server than in Oracle and Snowflake. Even on Teradata, there is another treatment for bteq and other scripting languages.

Solving the ambiguity.

In Snowflake, if you encounter the /*/ sequence in your code, it typically ends a block comment. However, if you're using it differently in your source code, make sure to adjust it accordingly.

Last updated