In SQL Server, you can run queries across database tables following the
syntax you mention if you have permissions to access both databases and
they are on the same server. I presume the same is true on other (not all)
database engines. If you have the SQL, then use the executesql feature and
This is logically impossible. The role of a database it to store data and
execute queries about the local data. If you have two, which one should
execute the query? Each one of them can only search local data. databases
do not talk to each other.
The only solution is not to do it in a query
On Tuesday, August 29, 2017 at 1:19:29 AM UTC-7, Artem wrote:
>
> Hi ,
> Yes, tried
> it rise error : OperationalError: no such table: table1
>
I think the problem is the db() out front. You're asking for an operation
(method) on a database object that doesn't have your tables. You have a
Hi ,
yes i'm tried .
it rise error : OperationalError: no such table: table1
On Tuesday, August 29, 2017 at 5:58:20 AM UTC+8, 黄祥 wrote:
>
> had you tried ?
> *e.g. not tested*
> rows = db(db1.table1.pid == db2.table2.pid).select()
>
> ref:
>
>
had you tried ?
*e.g. not tested*
rows = db(db1.table1.pid == db2.table2.pid).select()
ref:
http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Inner-joins
best regards,
stifan
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
-
My app require two database .
This why i post a question here ...
On Tuesday, August 29, 2017 at 1:55:09 AM UTC+8, Alfonso Serra wrote:
I guess this is the solution:
https:
//stackoverflow.com/questions/6824717/sqlite-how-do-you-join-tables-from-different-databases
I guess this is the solution:
https://stackoverflow.com/questions/6824717/sqlite-how-do-you-join-tables-from-different-databases
If you want to write simpler sqls, the tables should be within the same
database.
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
-
7 matches
Mail list logo