On Feb 28, 2011, at 7:42 AM, bigt wrote:

> generated sql contains invalid reference to table NONE
> 
> I don't know where the problem is in Camelot or Sqlalchemy.(latest 0.6
> trunk)
> 
> I am using a Firebird database.
> 
> I think that the sql derives from the following statements
> 
>        col = getattr( admin.entity, field_name )
>        query = select([col], distinct=True,
> order_by=col.asc()).select_from(table)
> 
> ProgrammingError: (ProgrammingError) (-204, 'isc_dsql_prepare: \n
> Dynamic SQL Error\n  SQL error code = -204\n  Table unknown\n  NONE\n
> At line 2, column 19') 'SELECT DISTINCT assets.yr \nFROM assets, None
> ORDER BY assets.yr ASC' ()
> 

this suggests that the variable named "table" is None.   select_from() is 
usually not needed in any case as the FROM clause is derived from the columns 
and the WHERE clause.


-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to