On 12/7/20 2:02 PM, [email protected] wrote:
Hello,

I'd like to use a variable for 'Big Company' (e.g. account) or where = 
statements generally in my cur.execute statements:

cur.execute("SELECT SUM(revusd) FROM sfdc where saccount = 'Big Company' AND stage 
LIKE 'Commit%';")
commitd1 = cur.fetchone()
conn.commit()

but I don't know the proper syntax with the cur.execute statement to use a 
variable.

https://www.psycopg.org/docs/usage.html#passing-parameters-to-sql-queries


I imagine others do  - thanks!

Best,

Hagen





--
Adrian Klaver
[email protected]


Reply via email to