Replies: 2 comments 6 replies
-
Greetings. the problem are the extra-brackets around the column name UPDATE taba s
SET s.appname = ( SELECT p.insuname
FROM tableb p
WHERE p.insurednum = '3701020000008819'
GROUP BY p.insuname )
, s.maskcode = 'P30'
WHERE s.pffno = '2671267'
; I am not sure if this a bug or a feature, because the Extra-Brackets would define a UPDATE table_name
SET ( a, b, c) = ( 1, 2, 3 ) |
Beta Was this translation helpful? Give feedback.
3 replies
-
Details as below, all these samples work on H2 and I will look into it. CREATE TABLE test (
a VARCHAR (1)
, b VARCHAR (1)
)
;
-- queries are supported
update test
set (a, b) = (select '1', '2');
-- value lists are not supported
update test
set (a, b) = values( '1', '2');
-- simple expression lists are not supported
update test
set (a, b) = ('1', '2');
-- complex expression lists are not supported
update test
set (a, b) = (1, (select 2)); |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I use the ccjsqlparserutil.parse method in jsqlparser to directly report an error,
Oracle Database my sql is like this:
update taba s set (s.appname) = (select p.insuname from tableb p where p.insurednum ='3701020000008819' group by p.insuname),s.maskcode='P30' where s.pffno = '2671267';
it can be used in plsql,but use this jar will reprot error:
Encountered unexpected token: ")" ")"
at line 1, column 91.
Was expecting one of:
"&"
","...................
I think it's the set a=(),b the ',' can't be explan
I use maven jar version is 4.0,
like this:
com.github.jsqlparser
jsqlparser
4.0
Beta Was this translation helpful? Give feedback.
All reactions