How can we help you today? How can we help you today?

Error when Trigger Code starts with ;

The Source Control software crashes (latest version) when the code within a trigger starts with ;
For example code below will crash the software:
CREATE TRIGGER [dbo].[trgCrashedCode]  ON [dbo].[Example]
AFTER UPDATE, INSERT
AS

   ;WITH cteCrashCode AS ---This line will let the software crash
    (
            SELECT COUNT(E.SurrogateKey) AS DummyResult, i.BusinessKey
            FROM dbo.Example E 
                     INNER JOIN inserted i ON i.BusinessKey = E.BusinessKey
           GROUP BY E.BusinessKey
    )
    UPDATE 
    SET CrashCalcColumn = cC.DummyResult
    FROM dbo.Example E
             INNER JOIN cteCrashCode cC ON cC.BusinessKey = E.BusinessKey
            

Please fix the software that it's not sensitive for semicolons or any other characters used within the code.
Also please update the software that if it may crash, that it specifies on which sql object that is!
It took me 4 hours to find the piece of code that was crashing the software :cry:

Rgds
Jelluh!
0

Comments

2 comments

  • RickyR
    Hi

    Thanks for your inquiry!
    I have created a ticket for this issue, and would like to take this issue offline for further troubleshooting.

    I will contact you through the case via the email listed for your forum account.

    Thanks for your time!

    Rick
    RickyR
    0
  • Sergio R
    Hi,

    This bug has been fixed in the current version of SQL Source Control.

    Thank you,
    Sergio R
    0

Add comment

Please sign in to leave a comment.