-
Notifications
You must be signed in to change notification settings - Fork 4.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SQL Syntax Highlighter Issue with CASE statement #12610
Comments
N++'s SQL highlighting module was designed for the Oracle PL/SQL dialect, so it's not entirely suitable for Microsoft's Transact-SQL, which I assume you're writing from the "dbo" name qualifier. Many past users have bumped into this limitation without realizing it, e.g.:
The Lexilla library already used by N++ does have a dedicated T-SQL module, but somebody needs to make a feature request for it to be implemented. By comparison, here's how SciTE styles your T-SQL query, after enabling the MS SQL module: |
P.S. |
P.P.S.
The extra stuff above is still relevant, but probably more useful as an independent issue. @pamanes, feel free to close this ticket if the workaround does the trick. |
Switch option as suggested above. |
thanks! that workaround works really well |
Description of the Issue
SQL file syntax highlighter fails when a case is involved in a specific way
Steps to Reproduce the Issue
UPDATE U SET Title = xt.Title OUTPUT case when (inserted.nt_account is not null and charindex('\', inserted.nt_account) > 0) then substring(inserted.nt_account, 1, charindex('\', inserted.nt_account) - 1) else null end domain INTO dbo.TABLE FROM dbo.TABLE2 xt
Expected Behavior
Code after chardindex should not be gray as it's not comments
Actual Behavior
You will notice the code after charindex is GRAY as if they were comments but they are not
The text was updated successfully, but these errors were encountered: