Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sql example?
Message
De
08/08/2000 20:57:45
Cindy Winegarden
Duke University Medical Center
Durham, Caroline du Nord, États-Unis
 
 
À
08/08/2000 17:30:18
Gerald McKinsey
Keystone Consulting Services, Inc.
Yorktown, Indiana, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
00402536
Message ID:
00402603
Vues:
8
Dustin,

For a book try SQL For Smarties (SEcond Edition) by Joe Celko.

Joe can be found on comp.databases.ms-sqlserver and microsoft.public.sqlserver.programming. Questions like yours are pretty platform independent so you could post either of those places.

If you want to learn SQL, read everything Celko posts, and on the MS VFP newsgroups, read everything that Anders Altberg posts.



>I hope some of the SQL gurus here can get me on the right track. How do I write a view that does this:
>
>If I had a CITIES table, with a 1-to-many relationship with TEMPERATURE table. TEMPERATURE simply contains a Temperature, a Date, and of course the CITY's ID. For fun, let's say I've entered in one record for each city, each day, for the last 2 years. (So after 2 years, each city would have 730 TEMPERATURE records)
>
>How would I write a view that would return the all-time high temperature for each city? (If I had 250 cities, I'd want 250 records sent back,.... one for each city)
>Simplest format: CITY NAME, TEMP, DATE.
>
>
>2nd question: what resources could you refer me to that would help me out with SQL statements like the one I wrote above? I'm not really interested in a SQL Bible, but more like what an Algorithm Book would do for a coder.... examples of how to do this weird thing, examples of how to do that,etc. The Vfp Help/MSDN seems to be really lacking. They had a good start, and attempted to show examples of each command, but not how to mix it up, use subqueries, etc.
>
>Thanks,
>Dustin
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform