db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bertrand VENZAL" <bertrand.ven...@cirso.fr>
Subject Query with Torque
Date Fri, 25 Nov 2005 09:52:10 GMT
Hi,

I ve got a problem to write a query with Torque with a join on the same 
table, is there a way to do it by using only one query.

My query syntax looks like that 
select DISTINCT a.* from localisation a , localisation b where 
b.loc_IR="SudOuest" and b.loc_regionAdmin=a.loc_organisme;

My table
LOCALISATION
ID      |       loc_organisme   |       loc_regionAdmin |       loc_IR |

1       |       Bordeaux        |       Aquitaine               | SudOuest 
|

2       |       Aquitaine       |       NULL                    | NULL |

My query should return the second row.

I probably miss a torque function that should allow that.

Thanks for your help
Bertrand
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message