Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB SQL » View Thread |
Messages 1 to 2 of 2 total |
Update First Few Records |
Thu, Dec 31 2009 10:52 AM | Permanent Link |
Stuart Kelly | Does ElevateDB support limit in a update statement?
I want to update only the first few matching records, for example: update temp set link_id = 1 where no = 'ABC' and plu = '1234' and link_id = 0 limit 2 Happy new year, Stu |
Thu, Dec 31 2009 12:50 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Stuart,
<< Does ElevateDB support limit in a update statement? >> Not directly, but you can do it like this: update temp set link_id = 1 where <uniquecolumn> in (select <uniquecolumn> from temp where no = 'ABC' and plu = '1234' and link_id = 0 range 1 to 2) Just replace <uniquecolumn> with a column name that uniquely identifies a row. -- Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Saturday, May 4, 2024 at 12:54 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |