Re: Formatting Embedded SQL

Rich Shepard <[email protected]>
Newsgroups gmane.comp.python.db.pysqlite.user
Message-ID <[email protected]>
On Tue, 5 Dec 2006, Milo Pschigoda wrote:

> Yeah, the spaces are a problem (to the best of my knowledge).

   Thanks, Milo. I tripped on this on another table and it took me a while to
realize it was the spaces generating the errors.

> I personally do something like
> self.cur.execute("CREATE TABLE name (ID integer primary key,"+
>                                                           "col2 integer,"+
>                                                           "col3 text)")

   And the plus signs are accepted by sqlite? Kewel!

> Just a thought, but I bet there's a programmatic way to do it better.

   Then perhaps we'll both learn something new.

Rich

-- 
Richard B. Shepard, Ph.D.               |    The Environmental Permitting
Applied Ecosystem Services, Inc.(TM)    |            Accelerator
<http://www.appl-ecosys.com>     Voice: 503-667-4517      Fax: 503-667-8863
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.