Extra unwanted brackets sqlserver values #6170
Unanswered
liepumartins
asked this question in
Q&A
Replies: 1 comment
-
Current workaround. Create a temporary table and populate with the same data as the
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Where("exists (select * from (values ? as V(a, b))", tupleList)
This generates
select * from (values ((1,2),(3,4),(5,6))) as V(a,b)
which is invalid syntax in sqlserver.Incorrect syntax near ','.
Because of extra brackets((1,2),(3,4),(5,6))
Correct should be
select * from (values (1,2),(3,4),(5,6)) as V(a,b)
without brackets around list of values like so(1,2),(3,4),(5,6)
How to achieve that?
BTW this worked fine in gorm v1 broke after upgrade to v2.
Beta Was this translation helpful? Give feedback.
All reactions