Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Structure unknown
Message
De
20/12/2005 19:25:29
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01079709
Message ID:
01079749
Vues:
22
>Hi everybody,
>
>I'd like to show distribution of accounts based on queue names or based on clients or based on product line or based on status. The distribution is going to be by department. Right now all the accounts are for Outpatient department ("O"). When I'm using distribution by Queues, I start from queues and left join to Trans file. Queues table has departments in it. In other cases I decided to show only actual distribution.
>
>So, this is my original code
>
>insert into curStats (cFullName, I, H, M, O, nTotal) ;
>		select cFullName, I, H, M, O, cast(I+H+M+O as n(5)) as nTotal from curStatistics
>
>But in cases other than Queues I may have less fields. What would be the best approach for me to overcome the problem? Build the insert command on the fly?
>
>Thanks in advance.

I think with APPEND BLANK, followed by REPLACE, it is easier to conditionally set, or not set, a specific field.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform