This produces a table with a single column and the rows consisting of
what should have been the header columns followed by the body columns
manifested as rows also.

On Nov 17, 10:25 am, DenesL <denes1...@yahoo.ca> wrote:
> Why not just:
>
> table = TABLE(THEAD(columns), TBODY(raw_rows))
>
> On Nov 16, 3:43 pm, David Watson <davidthewat...@gmail.com> wrote:
>
>
>
>
>
>
>
> > Does anybody have example code showing how to package the return from
> > executesql as a gluon.sql.Rows object?
>
> > I have tried:
>
> >     raw_rows = legacy_db.executesql(sqlstr, as_dict=True)
> >     from gluon import sql
> >     columns = ['col1', 'col2', 'col3']
> >     rowsobj = sql.Rows(legacy_db, raw_rows, columns)
> >     table = SQLTABLE(rowsobj)
>
> > but this blows up in sql.Rows. I'm just looking for a quick and dirty
> > (throw-away) way to do some reports with existing complex SQL queries.
>
> > Thanks,
> > Dave

Reply via email to