On 4 October 2013 12:39, TYRANISTAR <makisthegr...@gmail.com> wrote:

> Thank you for your reply. Do you have an example on how to do that? Sorry
> for asking but I am still a newbie at web2py.
>

Create a view in the backend or use db.executesql(your query creating the
VIEW containing the 'UNION').
Make sure your view contains an 'id' field.  You can put something like
'SELECT 1 AS id ...'  in the query.
In your crontroller or in the model, create a table definition to reflect
the view and make put in that definition: migrate = False

You can then do a

data = SQLFORM.grid(db.<view that you created>.id > 0, ...)

Regards
Johann

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to