Hello, I have a model ```model Test { id string...
# orm-help
a
Hello, I have a model
Copy code
model Test {
id    string
res   Json
}
I want to update multiple rows with different id of the above model I am getting syntax error while running the below query
Copy code
prisma.$queryRaw(`UPDATE "TEST" AS T SET
        "res" = a.res
        FROM (VALUES ${updatedData})
        AS a(id, res)
        WHERE a.id = C.id;`);
updateData have value
('1', '[{"name": 'abc'}]'), ('2', '[{"name": 'xyz'}]')
I tried adding JSONB after every res values and also after a.res but nothing worked can you please help me on this? Error:
Copy code
(node:23980) UnhandledPromiseRejectionWarning: Error: 
Invalid `prisma.queryRaw()` invocation:
  Raw query failed. Code: `42601`. Message: `db error: ERROR: syntax error at or near "m"`
  at cb (/node_modules/@prisma/dist/runtime/index.js:34800:17)
r
@Arfath Tade 👋 What is
C
here in:
Copy code
WHERE a.id = C.id;`
a
@Ryan sorry it is a typo it should be T and not C, when I ran the query I used the correct alias