Ok, now it works,
thank you Michael,
jo
Michael Bayer ha scritto:
> put "correlate=False" in your subquery.
>
> On Mar 16, 2007, at 12:43 PM, Jose Soares wrote:
>
>
>> Hi,
>> Seems that SA compiles in a wrong way my query...
>>
>> In [9]: sql=select([UnitaAziendale.c.id])
>>
>> In [10]: subve
Sébastien LELONG ha scritto:
>> As you can see the from_obj of subselect is wrong, the FROM should be:
>>
>> FROM azienda_veterinario, unita_aziendale
>>
>
> OK, I see... You probably mean that since your sub-select occurs on two
> tables, those have to be present in the FROM clause. I've te
put "correlate=False" in your subquery.
On Mar 16, 2007, at 12:43 PM, Jose Soares wrote:
>
> Hi,
> Seems that SA compiles in a wrong way my query...
>
> In [9]: sql=select([UnitaAziendale.c.id])
>
> In [10]: subvet = select([azienda_veterinario.c.id_unita_aziendale],
>: and_(
> As you can see the from_obj of subselect is wrong, the FROM should be:
>
> FROM azienda_veterinario, unita_aziendale
OK, I see... You probably mean that since your sub-select occurs on two
tables, those have to be present in the FROM clause. I've tested this kind on
query (select a from A whe
Sébastien LELONG ha scritto:
>> Seems that SA compiles in a wrong way my query...
>>
>
> Can't what's wrong is happening... subvet appers to be a sub-select, so
> probably SA made some optimizations. You should print the whole query (print
> sql) and not the sub-query (as in your code: prin
> Seems that SA compiles in a wrong way my query...
Can't what's wrong is happening... subvet appers to be a sub-select, so
probably SA made some optimizations. You should print the whole query (print
sql) and not the sub-query (as in your code: print subvet) to check if your
query is actually