Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to build a view
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00634679
Message ID:
00635256
Vues:
42
>I tend to only use the query designer to rough out an idea and then place the code into a file and refine it. I figured I would do the same with the view designer. I normally remove the '= .T.' later on if I forget to manipulate the designer correctly.
><<
>
>Oh, I see!
>
>
>>>
>The above code returns one big total sales, without the SUM() I get all the work order amounts sorted by ascending amounts. I'm trying to get a view with a field with a client name and a field with total sales for each client.
><<
>
>What about an additional GROUP CLAUSE - or I'm missing something:
>
>SELECT Cdm30wrk.cmp_name, SUM(Cdm30wrk.wrk_tlamt);
> FROM classicdb!cdm30wrk;
> WHERE Cdm30wrk.wrk_page = 1;
>   AND Cdm30wrk.wrk_stat = "A-ACCTNG";
>   AND YEAR(Cdm30wrk.wrk_odate) = YEAR(DATE()) - 1;
> GROUP BY 1 ;
> ORDER BY 2, 1
>
I'll give that a try as soon as I deal with a server that is thinking of crashing. Always something. [:-\
Opportunity is missed by most people beacuse it is dressed in overalls, and looks like work --- Thomas Edison
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform