[Tutor] Syntax Question

Rich Shepard rshepard at appl-ecosys.com
Wed Feb 8 21:35:20 CET 2006


   I'm trying to understand how to write SQL statements using pysqlite. The
problem is that if I use newlines to format the SQL statements as I would
with straight SQLite or PostgreSQL, python complains because it sees the
newline before the end of the quoted string.

   So, I make the CREATE TABLE command one long string, since the column names
are separated by commas. But, I'm stuck trying to write a trigger since there
are no commas separating phrases and python doesn't like it run together as a
single string.

   There must be something that I'm missing here.

TIA,

Rich

-- 
Richard B. Shepard, Ph.D.               |   Author of "Quantifying Environmental
Applied Ecosystem Services, Inc. (TM)   |  Impact Assessments Using Fuzzy Logic"
<http://www.appl-ecosys.com>     Voice: 503-667-4517         Fax: 503-667-8863


More information about the Tutor mailing list