Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
>>property.key is unique.
>
>If it's unique why do you group on it? Also, what do you need exp_tick in the query for?
>
I need a table of unique properties that have outstanding or expired ticklers (they have an overdue task). exp_tick is all outstanding records from the tickler table. There could be multiple oustanding ticklers per property.key. so when i join exp_tick and property1, there are duplicate property.key in the resulting table. want to end up with properties that have outstanding ticklers, but the property.key is unique.
pre.select b.* ;
from (exp_tick) a, property1 b ;
where (b.key = a.key) ;
into table (exp_prop);
group by b.key ;
order by b.key
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement