Subject: UPDATE with multiple WHERE conditions

From: Rich Shepard <[email-masked]>
Date: Wed, 12 Jun 2024 14:28:32 -0700 (PDT)

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

---

From: "David G. Johnston" <[email-masked]>
Date: Wed, 12 Jun 2024 15:09:57 -0700

On Wed, Jun 12, 2024 at 2:28 PM Rich Shepard <[email-masked]>
wrote:

> 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.

---

From: Rich Shepard <[email-masked]>
Date: Wed, 12 Jun 2024 15:41:14 -0700 (PDT)

> copy-paste them into psql or whatnot.

David,

I'll create and use a temporary table.

Thanks,

Rich