Interesting, and I had thought about it, but wouldn't that run the subquery
(myselect) 3 times for each join?
On Sunday, April 20, 2014 10:01:20 PM UTC-4, Michael Bayer wrote:
there’s a way to get the tuple comparison to work here though it’s not as
common, I’d have to try it out and there
no, the SQL is SELECT ... FROM x JOIN y ON x.a=y.a AND x.b=y.b AND x.c=y.c
On Apr 21, 2014, at 9:02 AM, Rick Otten rottenwindf...@gmail.com wrote:
Interesting, and I had thought about it, but wouldn't that run the subquery
(myselect) 3 times for each join?
On Sunday, April 20, 2014
I would like to apply a condition in an outer join that matches a
multi-item list rather than a single value.
In other words, I'm trying to get SQLAlchemy 0.8.6 connecting to PostgreSQL
9.3.4 to generate SQL like this:
select
*
from
mytable mt
left outer join myothertable mo
there's a way to get the tuple comparison to work here though it's not as
common, I'd have to try it out and there might be some quirks to work out. I
would think this would be more straightforward using a straight AND:
and_(mo.c.col1 == myselect.c.col1, mo.c.col2 == myselect.c.col2, mo.c.col3
Hi:
When I run the attached example, I get the following error:
sqlalchemy.exc.NoInspectionAvailable: No inspection system is
available for object of type type 'NoneType'
Which is a result of literal(1) appearing first in the select list.
I don't particularly care than I can't order my columns
when you do outerjoin() it will try to join from the first item in the list,
unless you do select_from:
query(literal(), X.foo, Y.bar).select_from(X).join(Y, )
will see what can be done about the error message
On Mar 17, 2014, at 2:58 PM, Ryan Kelly rpkell...@gmail.com wrote:
Hi:
the error message has been improved in 9ec01ab35a / 987759aec51e (0.9 / 0.8)
On Mar 17, 2014, at 4:16 PM, Michael Bayer mike...@zzzcomputing.com wrote:
when you do outerjoin() it will try to join from the first item in the list,
unless you do select_from:
query(literal(), X.foo,
Hi,
I have this subquery, which yields results
sp_HeaderDetails =
session.query( InvoiceCashFlowPerDocNum.sequence_id,
InvoiceHeaderInfo.invoice_ref, InvoiceHeaderInfo.doc_num ) \
.filter( ( InvoiceCashFlowPerDocNum.doc_num ==
InvoiceHeaderInfo.doc_num ) ) \
On Jan 26, 2011, at 11:46 AM, Pankaj wrote:
Hi,
I have this subquery, which yields results
sp_HeaderDetails =
session.query( InvoiceCashFlowPerDocNum.sequence_id,
InvoiceHeaderInfo.invoice_ref, InvoiceHeaderInfo.doc_num ) \
.filter( (
Hi,
I have 3 tables - tbl_item, tbl_item_sku, and tbl_item_lot
Table tbl_item has 2 FKs
my mapper is pretty simple:
mdbItem = mapper(dbItem, tbl_item,
properties={
'sku': relation(dbItemSKU,
Hello all;
I am trying to do a subselect on an Outer join. I have a table of
votes that can apply to multiple objects in my system so their is no
direct foreign key. A Voteable type implementation. When i load the
list of Projects, i want to return the current users votes eagerly if
possible,
Hi,
I have the following two tables (in MySql):
CREATE TABLE `A` (
`xkey` varchar(200) NOT NULL,
`yval` int(11) default NULL,
PRIMARY KEY (`xkey`)
) ENGINE=InnoDB;
and
CREATE TABLE `B` (
`xkey` varchar(200) NOT NULL default '',
`s` enum('yes','no') NOT NULL default 'yes',
PRIMARY
Hi,
Note the following code:
oj=outerjoin(s,f)
r1=select([oj]).execute().fetchall()
r2=select([oj.left.c.id, oj.right.c.status]).execute().fetchall()
The first select executes a LEFT OUTER JOIN and returns all columns.
I wanted only 2 specific columns, so I tried the 2nd select.
That does not
13 matches
Mail list logo