Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kmOaA-0007Eg-Pc for psycopg@arkaria.postgresql.org; Mon, 07 Dec 2020 22:02:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kmOa9-0003sl-Mc for psycopg@arkaria.postgresql.org; Mon, 07 Dec 2020 22:02:09 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kmOa9-0003se-G8 for psycopg@lists.postgresql.org; Mon, 07 Dec 2020 22:02:09 +0000 Received: from p3plsmtpa06-05.prod.phx3.secureserver.net ([173.201.192.106]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kmOa6-000806-58 for psycopg@lists.postgresql.org; Mon, 07 Dec 2020 22:02:08 +0000 Received: from DESKTOPPBOKT6J ([98.38.100.21]) by :SMTPAUTH: with ESMTPSA id mOa3kWLvX9lQzmOa3kXlrD; Mon, 07 Dec 2020 15:02:04 -0700 X-CMAE-Analysis: v=2.4 cv=RoQAkAqK c=1 sm=1 tr=0 ts=5fcea65c a=tZXnaF/PLMojNGgMD7Zm7A==:117 a=tZXnaF/PLMojNGgMD7Zm7A==:17 a=IkcTkHD0fZMA:10 a=h3ASVhPD2VoyY7TZGrIA:9 a=QEXdDO2ut3YA:10 X-SECURESERVER-ACCT: hagen@datasundae.com From: To: , Subject: Inserting variable into Date: Mon, 7 Dec 2020 15:02:03 -0700 Message-ID: <0bef01d6cce4$987d8120$c9788360$@datasundae.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 16.0 Content-Language: en-us Thread-Index: AdbM4/zflkLHvolZT1O+jLzD7hLY5A== X-CMAE-Envelope: MS4xfBiGCnB+M0JoaQsg+Pf9R9UnFylTKEPSUWXnFbKCa9OlQhOckfyDPcZFRjw27IA3mx0s5SJ+faOroFHPWyJgj5yKjP6+W0lpxx1Xe/xFwVvondc9/2+s tm+9jYmTYIJWuZhOUNTb1Vmd0QdHSJaXaOLebrEBhtV+lFKqlfFve62/D+HyKxswlNSKPeCT+hKE5cnjiqEOEWQSuyF1tJB0vPaKGb6gSlePGy+WdUJXX+oI List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hello, I'd like to use a variable for 'Big Company' (e.g. account) or where =3D = statements generally in my cur.execute statements: cur.execute("SELECT SUM(revusd) FROM sfdc where saccount =3D 'Big = Company' AND stage LIKE 'Commit%';") commitd1 =3D cur.fetchone() conn.commit() but I don't know the proper syntax with the cur.execute statement to use = a variable.=20 I imagine others do - thanks! Best, Hagen