Information générale
Catégorie:
Codage, syntaxe et commandes
>Ah-ha! Right you are. You only need to select from the two tables that have billable clients in them, since you don't care about clients (in the Clients table) that are not billable. So, all you need is a single join:
>
>SELECT DISTINCT Client_num, Client_SRC, FName, LName ;
>FROM Ver ;
>UNION ;
>SELECT DISTINCT Client_num, Client_SRC, FName, LName ;
>FROM Bal ;
>INTO CURSOR Billable_Clients
>
>Again, the UNION will filter any rows that appear in both tables. This should be acceptably fast, too. Oh, I like it. Let us all know if this doesn't give you the right results.
What happens if Jimmy Jones is in both ver and bal? I want him to show up in the final table, but only once.
Will that do it?
I must admit this is more elegant than what I came up with. Once I realized that the select I had actually wasn't doing what I wanted to, and having a serious time constraint, along with a limited knowledge of SQL, I resorted to a rather clunky method. I copied all clients from the ver table into another table. Then I appended to that table all clients in bal that weren't already in the new table. It works, but it's not pretty. :)
BTW - I love your flag!
Thanks!
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