Jean-Luc Hainaut wrote:
> Python 2.7.6, SQLite v3.8.5

So this is not the standard Python distribution?

> import sqlite3
> conn = sqlite3.connect('ORDERS.db')
> c = conn.cursor()
>
> query = "with CTE1(ID,Name,City)"\
>         + " as (select CustID,Name from CUSTOMER where City = 'London')"\
>         + " select * from CTE1"

Error: table CTE1 has 2 values for 3 columns

> c.execute(query)
>
> print c.description
>
>
> Description of the bug:
> - if the result set is not empty, c.description returns the list of column 
> names, as expected.
> - if the result set is empty, c.description returns None.

As far as I can see, SQLite returns correct column information even for empty 
result sets.

Report bugs in the Python SQLite module here:
<https://github.com/ghaering/pysqlite/issues>


Regards,
Clemens
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to