Parser error OFFSET FETCH Clause

tsql
sonarcloud

(Emiliano Sacchi) #1

Hi:

I’m using sonarcloud for analyze some T-SQL code and I’m get: [WARNING] Unable to parse file ‘/var/…/myFILE.tsql’ : Parse error at line 42 column 5:

set @myVariableX=(
SELECT COUNT (*)
FROM
	(SELECT *
	   FROM TableA
	  WHERE field1A = @p_UserID
	 ORDER BY field2A DESC
	 OFFSET 0 ROWS
	 ^
	 FETCH NEXT (@myVariableY) ROWS ONLY) as a
WHERE a.fiend3A = @myVariableZ)

(Pierre-Yves Nicolas) #2

Hi,

The OFFSET clause is simply not supported by our parser.
We will fix that: SONARTSQL-135

Thanks a lot for the feedback!

Pierre-Yves