Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sum memo fields
Message
De
05/03/2012 16:31:37
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Sum memo fields
Divers
Thread ID:
01537332
Message ID:
01537332
Vues:
82
Hi All -

It seems like I should know how to do this but for some reason I am drawing a blank. Suppose you have 2 tables in a 1 to many raltionship. Table1 contains data about various businesses.
Table2 (child) contains notes (memo field) about those businesses.
How do you write an sql that will sum the notes into a single field so that we end up with 1 record per business including a field with all of the notes?

Something like
SELECT table1.*, sum(table2.Notes) as Notes ;
FROM table1;
left join table2 ON key . . . .
I might add that this is VFP data exposed on a asp website. The end game is to export all of the data to excel.
Thanks for any help on this.
I'm stumped. :)
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform