Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB SQL » View Thread |
Messages 1 to 2 of 2 total |
Multiple updates? |
Thu, Feb 20 2020 10:48 AM | Permanent Link |
COMSPOC | Hi All,
We recently discovered that it's possible to do an 'array insert' with Elevate like so: INSERT INTO SOMETABLE (COLA, COLB) VALUES ('A','B'), ('C','D'), ('E', 'F'); In our particular use case this is many times faster than inserting each row in its own statement, so our developers are asking if there is a syntax that would allow the same sort of functionality with updates? I'm may be interpreting it wrong, but the way I read the syntax diagram the multi-row insert doesn't appear to be possible, so I'm hoping the update might have another hidden gem Thanks. |
Sun, Mar 22 2020 6:35 AM | Permanent Link |
Fernando Dias Team Elevate | AGI
I don't know if this is what you are looking for, but here it is: UPDATE ATable SET BColumn = CASE WHEN AColumn = 7 THEN 'x' WHEN AColumn = 8 THEN 'y' WHEN AColumn = 9 THEN 'z' END It will update a column in multiple rows, depending on a condition, with a single statement. -- Fernando Dias [Team Elevate] |
This web page was last updated on Tuesday, September 17, 2024 at 04:19 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |