Inserting variable into

Поиск
Список
Период
Сортировка
От
Тема Inserting variable into
Дата
Msg-id 0bef01d6cce4$987d8120$c9788360$@datasundae.com
обсуждение исходный текст
Ответы Re: Inserting variable into  (Adrian Klaver <adrian.klaver@aklaver.com>)
Список psycopg
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.

I imagine others do  - thanks!

Best,

Hagen




В списке psycopg по дате отправления:

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: Handling (None,) Query Results
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: Inserting variable into