T-SQL Rule RSPEC-1745 doesn't considered rules when Insert is used with an Select statement

tsql

(Christian Rohr ) #1

I don’t know if it’s a bug or a missing feature for this case, but the following case is not recognized by the rule RSPEC-1745

Not compliant:

INSERT INTO dbo.Testtable 
SELECT column1, column2
FROM dbo.Table2

Compliant:

INSERT INTO dbo.Testtable (column1, column2)
SELECT column1, column2
FROM dbo.Table2

Could you check this? :slight_smile: Thank you very much.

Chris


(Alexandre Gigleux) #3

Hello Christian,

It’s a False-Negative as I would also expect S1745 to raise an issue here.

I created https://jira.sonarsource.com/browse/SONARTSQL-192 to enhance the behaviour of RSPEC-1745

Thanks
Alex


(Christian Rohr ) #4

Thank you.