FAQ

Shyam Parimal Katti <spk265@nyu.edu> writes:


A semi-colon in the string value indicates the termination of a sql query.
So the expected out come is a conversion to a list of valid sql queries:
['drop table sample_table;', 'create table sample_test (col1 int);',
'select col1 from sample_test;']

I presume these strings are split from lines of input. If so, you would
be better advised to use an SQL parsing library in the first place
<URL:https://pypi.python.org/pypi/sqlparse/>, to get distinct SQL
statements from a text stream.


--
  \ ?We must find our way to a time when faith, without evidence, |
   `\ disgraces anyone who would claim it.? ?Sam Harris, _The End of |
_o__) Faith_, 2004 |
Ben Finney

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 5 of 7 | next ›
Discussion Overview
grouppython-list @
categoriespython
postedDec 12, '13 at 8:40p
activeDec 13, '13 at 10:07a
posts7
users5
websitepython.org

People

Translate

site design / logo © 2022 Grokbase