Re: [web2py] Re: How can I union 2 different table datasets?

2017-05-10 Thread George D Elig
the db, and then just create a DAL > model based on that view (turn off migrations for that model so the DAL > does not attempt to create a table for it). From that point, you can use > that model for queries via the DAL. > > Anthony > > On Thursday, April 27, 2017 at 10:25:35 PM

[web2py] Re: How can I union 2 different table datasets?

2017-04-27 Thread George D Elig
Unfortunately, I cannot combine the two tables. The existing product uses one of them extensively for queue processing and I don't want to possibly break any of that functionality. All I want to do is update the SQLFORM with information from the new table. I can use db.executesql but won't that

[web2py] Re: How can I union 2 different table datasets?

2017-04-25 Thread George D Elig
solution. On Saturday, April 22, 2017 at 4:51:21 PM UTC-4, George D Elig wrote: > > I have the following tables defined and would like to display rows of > cats, followed by rows of dogs > > db.define_table(‘cat’, > > Field('name', 'string', length=45), > > Field(‘

[web2py] How can I union 2 different table datasets?

2017-04-22 Thread George D Elig
I have the following tables defined and would like to display rows of cats, followed by rows of dogs db.define_table(‘cat’, Field('name', 'string', length=45), Field(‘age’, ‘integer’), Field(‘apt_time’,’datetime’) ) db.define_table(‘dog’, Field('name', 'string', length=45), Field(‘age’,

[web2py] Help with creating a Select within the Web2Py DAL for a SQL query that uses an 'exists' clause

2017-04-21 Thread George D Elig
I have a simple SQL query that pulls a column value from a secondary table, based on a ID being equal in both tables. The query uses an exists clause on a subquery. select sites.domain_name, batch.batch_name from sites, batch where exists (select batch.id from batch where

[web2py] How can I create a DAL Select statement from a SQL exists clause?

2017-04-21 Thread George D Elig
I have the following SQL statement that I'm having difficulty converting to a db()Select statement. I could use a left join but I can only return one row, which is being addressed with 'limit 1' select sites.domain_name, batch.batch_name from sites, batch where exists (select batch.id from