I could use an explanation of the "Strip Comments" option.
Here is my situation: I am using AI to install a series of updated stored procedures (sp) into a db. Each sp has its own "Sql Script" in AI, and all are configured exactly the same - the "Strip Comments" option is NOT CHECKED.
The source file for a sp looks like this, note the presence of comments and carriage returns provided for readability:
Code: Select all
-- get the status of the user account
SELECT @AccountStatusCode = AccountStatusCode
FROM Usr
WHERE UsrCode = @UsrCode
print @UsrCode
IF @AccountStatusCode = 0
RETURN 3 -- account disabled
IF @AccountStatusCode = 2
RETURN 7 -- account revoked
IF @AccountStatusCode IS NULL
RETURN 1 -- invalid user
-- check if the good password has been specified for the user
EXEC @CheckResult = usp_CheckUsrPwd @UsrCode, @UsrPwd
print @CheckResult
Code: Select all
SELECT @AccountStatusCode = AccountStatusCode
FROM Usr
WHERE UsrCode = @UsrCode
print @UsrCode
IF @AccountStatusCode = 0
RETURN 3 IF @AccountStatusCode = 2
RETURN 7 IF @AccountStatusCode IS NULL
RETURN 1 EXEC @CheckResult = usp_CheckUsrPwd @UsrCode, @UsrPwd
print @CheckResult
The functionality of the sp is unchanged - it just looks different to the human eye. This is causing some confusion, as the sp in the db appears - without close inspection - to be different than its source.
An explanation of these two behaviors:
-comment stripping when "strip comments" is not selected
-"readability" carriage returns being removed
would be greatly appreciated. Thanks much.