2021-06-03 09:05:38 +02:00
|
|
|
=== is related to: S3613
|
2021-06-02 20:44:38 +02:00
|
|
|
|
2021-06-03 09:05:38 +02:00
|
|
|
=== is related to: S3614
|
2021-06-02 20:44:38 +02:00
|
|
|
|
2021-06-03 09:05:38 +02:00
|
|
|
=== on 20 Jul 2017, 15:26:19 Pierre-Yves Nicolas wrote:
|
2021-06-02 20:44:38 +02:00
|
|
|
According to the Microsoft https://docs.microsoft.com/en-us/sql/t-sql/language-elements/fetch-transact-sql[reference for FETCH]:
|
|
|
|
|
|
|
|
____
|
|
|
|
The number of variables must match the number of columns in the cursor select list.
|
|
|
|
____
|
|
|
|
|
|
|
|
|
|
|
|
The code can be compiled with no issue, for example in a stored procedure. The following error is raised at runtime:
|
|
|
|
|
|
|
|
----
|
|
|
|
Msg 16924, Level 16, State 1, Line 61
|
|
|
|
Cursorfetch: The number of variables declared in the INTO list must match that of selected columns.
|
|
|
|
----
|
|
|
|
|
2021-06-03 09:05:38 +02:00
|
|
|
=== on 7 Aug 2017, 15:03:24 Pierre-Yves Nicolas wrote:
|
2021-06-02 20:44:38 +02:00
|
|
|
\[~massimo.paladin] Why minor? Such code triggers a failure at execution time.
|
|
|
|
|