Skip to content
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

TSQL: TRIGGER functions UPDATE() and COLUMNS_UPDATED() not yet supported #5960

Open
3 tasks done
keen85 opened this issue Jun 10, 2024 · 0 comments
Open
3 tasks done
Labels
bug Something isn't working t-sql Issues related to the T-SQL/TSQL/Transact SQL dialect

Comments

@keen85
Copy link
Contributor

keen85 commented Jun 10, 2024

Search before asking

  • I searched the issues and found no similar issues.

What Happened

TSQL / MS SQL has some poprietary functions that can be used for UPDATE TRIGGERs:

Expected Behaviour

This should be parseable:

CREATE TRIGGER reminder  
ON Person.Address  
AFTER UPDATE   
AS   
IF ( UPDATE (StateProvinceID) OR UPDATE (PostalCode) )  
BEGIN  
RAISERROR (50009, 16, 10)  
END;  
GO 

https://learn.microsoft.com/en-us/sql/t-sql/functions/update-trigger-functions-transact-sql?view=azuresqldb-current#examples

Observed Behaviour

Line 6, Position 6: Found unparsable section: 'UPDATE (StateProvinceID) OR UPDATE (Post...'

How to reproduce

run SQLFluff Online on statement from "Expected Behavior"

Dialect

tsql

Version

SQLFluff online: 3.0.7

Configuration

SQLFluff online: 3.0.7

Are you willing to work on and submit a PR to address the issue?

  • Yes I am willing to submit a PR!

Code of Conduct

@keen85 keen85 added the bug Something isn't working label Jun 10, 2024
@github-actions github-actions bot added the t-sql Issues related to the T-SQL/TSQL/Transact SQL dialect label Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working t-sql Issues related to the T-SQL/TSQL/Transact SQL dialect
Projects
None yet
Development

No branches or pull requests

1 participant