You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I temporarily solve my problem according to issue 796
Because the regex of sqlx v1.3.5 requires a closing bracket before values
So I added a line of comment --) to my query to temporarily solve my problem
MERGE test_table trg
USING (VALUES (:keycol, :col1, :col2)) src(keycol, col1, col2)
ONtrg.keycol=src.keycol
WHEN MATCHED THEN
UPDATESET col1 =src.col1, col2 =src.col2
WHEN NOT MATCHED THEN
INSERT(keycol, col1, col2)
VALUES(src.keycol, src.col1, src.col2);
To
MERGE test_table trg
USING (
-- )VALUES (:keycol, :col1, :col2)) src(keycol, col1, col2)
ONtrg.keycol=src.keycol
WHEN MATCHED THEN
UPDATESET col1 =src.col1, col2 =src.col2
WHEN NOT MATCHED THEN
INSERT(keycol, col1, col2)
VALUES(src.keycol, src.col1, src.col2);
when I use
sql server
batch insert and updateI got error
sql: expected 3 arguments, got 12
when len(data) = 1 is no problem
I want to confirm whether the batch insert of sql server is not yet supported?
The text was updated successfully, but these errors were encountered: