From: | Rich Shepard <rshepard(at)appl-ecosys(dot)com> |
---|---|
To: | psycopg(at)postgresql(dot)org |
Subject: | Re: New user questions |
Date: | 2021-07-13 22:02:43 |
Message-ID: | alpine.LNX.2.20.2107131457030.11509@salmo.appl-ecosys.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | psycopg |
On Tue, 13 Jul 2021, Adrian Klaver wrote:
> Triple quoting is used when the statement extends across more then one
> line. Pair of double quotes is used for single line statement, especially
> when there are single quoted values in the statement.
Adrian,
That makes sense: the statements are treated as comments. I hadn't thought
of them that way.
>> 2) How do I write a cursor execute UPDATE statement where the columns and
>> values to be updated can be single or multiple and the values passed into
>> the method from the tkinter widgets? Are there examples from which I can
>> learn?
>
> There are several ways to read the above.
> Send some examples of what you want to do.
Here's a template:
update contacts
set
where
;
The contacts table has these attributes:
person_nbr | integer
act_date | date
act_type | character varying(12)
notes | text
next_contact | date
Could be a changed next_contact date, or notes, or both.
Other tables need updating; for example, a new job title for a person or a
new web site for a company.
Thanks,
Rich
From | Date | Subject | |
---|---|---|---|
Next Message | Adrian Klaver | 2021-07-13 22:23:11 | Re: New user questions |
Previous Message | Adrian Klaver | 2021-07-13 21:51:46 | Re: New user questions |