raw string

thanosv at gmail.com thanosv at gmail.com
Tue Sep 18 08:47:05 EDT 2007


On Sep 18, 5:20 am, Konstantinos Pachopoulos <kostaspa... at yahoo.gr>
wrote:
> Hi,
> i am trying to execute the following query on a DB:
> qe.execQuery(r"SELECT * FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY
> '"' LINES TERMINATED BY '\n' FROM Commiter")
>
> However, whether i put the r in the front or not, i always get an error
> about the "\n".
> What's wrong?

Try

r"SELECT * FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '\"' LINES
TERMINATED BY '\n' FROM Commiter"

It works for me.





More information about the Python-list mailing list