On Fri, May 14, 2010 at 12:38 PM, Fabio Spadaro <fabiolinos...@gmail.com>wrote:

>
> No, i'm sure. Probably typeof in python's sqlite is not supported very mell
> or there is other explanation.
>

It works perfectly in Python:

In [2]: import sqlite3
In [3]: conn = sqlite3.connect(':memory:')
In [4]: c = conn.cursor()
In [5]: c.execute("CREATE TABLE tabA (a INTEGER, B INTEGER)")
In [6]: c.execute("INSERT INTO tabA VALUES (1,10)")
In [7]: c.execute("INSERT INTO tabA VALUES (2,20)")
In [8]: c.execute("CREATE TABLE tabB (theNum INTEGER, theName TEXT)")
In [9]: c.execute("INSERT INTO tabB VALUES (10,'albert')")
In [10]: c.execute("INSERT INTO tabB VALUES (20,'bertha')")
In [11]: res = c.execute("SELECT
tabA.a,tabB.theNum,tabB.theName,typeof(tabB.theNum),typeof(tabB.theName)
FROM tabA JOIN tabB ON tabB.theNum = tabA.b")
In [12]: for r in res.fetchall(): print r
   ....:
(1, 10, u'albert', u'integer', u'text')
(2, 20, u'bertha', u'integer', u'text')


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

Reply via email to