The question speaks for itself. This is the reproducible script create table t (c1 int, c2 int); begin declare x int = 1; insert into t (c1, c2) values (x, 1); insert into t (c1, c2) values (1, 1), (1, 2); insert into t (c1, c2) values (x, 1), (x, 2); //=> Invalid value for INSERT near 'x' on line 6" end create variable y int = 1; insert into t (c1, c2) values (y, 1); insert into t (c1, c2) values (y, 1), (y, 2); //=> Invalid value for INSERT near 'y' on line 1 |
Fails also with v17.0.10.5963...
The Help contains these three poorly written stream-of-conciousness sentences:
The Help never clearly defines what a "procedure variable" is, and it only refers to "procedure variable" in this and one other location.
This is proof of the adage, "If you can't document it, you can't code it", something I have proven by personal example many times :)
Well at least they documented it a bit better compared to version 16... The help for version 16 only says:
Yeah, there are two ways to fix a bug, as discussed here: change the code, or change the documentation.