public inbox for [email protected]help / color / mirror / Atom feed
UPDATE with multiple WHERE conditions 3+ messages / 2 participants [nested] [flat]
* UPDATE with multiple WHERE conditions @ 2024-06-12 21:28 Rich Shepard <[email protected]> 0 siblings, 1 reply; 3+ messages in thread From: Rich Shepard @ 2024-06-12 21:28 UTC (permalink / raw) To: [email protected] I have a table with 3492 rows. I want to update a boolean column from 'false' to 'true' for 295 rows based on the value of another column. Is there a way to access a file with those condition values? If not, should I create a temporary table with one column containing those values, or do I write a psql script with 295 lines, one for each row to be updated? TIA, Rich ^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: UPDATE with multiple WHERE conditions @ 2024-06-12 22:09 David G. Johnston <[email protected]> parent: Rich Shepard <[email protected]> 0 siblings, 1 reply; 3+ messages in thread From: David G. Johnston @ 2024-06-12 22:09 UTC (permalink / raw) To: Rich Shepard <[email protected]>; +Cc: [email protected] On Wed, Jun 12, 2024 at 2:28 PM Rich Shepard <[email protected]> wrote: > I have a table with 3492 rows. I want to update a boolean column from > 'false' to 'true' for 295 rows based on the value of another column. > > Is there a way to access a file with those condition values? > I'll often just use a spreadsheet to build the 295 update commands and copy-paste them into psql or whatnot. David J. ^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: UPDATE with multiple WHERE conditions @ 2024-06-12 22:41 Rich Shepard <[email protected]> parent: David G. Johnston <[email protected]> 0 siblings, 0 replies; 3+ messages in thread From: Rich Shepard @ 2024-06-12 22:41 UTC (permalink / raw) To: [email protected] On Wed, 12 Jun 2024, David G. Johnston wrote: > I'll often just use a spreadsheet to build the 295 update commands and > copy-paste them into psql or whatnot. David, I'll create and use a temporary table. Thanks, Rich ^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2024-06-12 22:41 UTC | newest] Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2024-06-12 21:28 UPDATE with multiple WHERE conditions Rich Shepard <[email protected]> 2024-06-12 22:09 ` David G. Johnston <[email protected]> 2024-06-12 22:41 ` Rich Shepard <[email protected]>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox