Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sql example?
Message
From
08/08/2000 20:57:45
Cindy Winegarden
Duke University Medical Center
Durham, North Carolina, United States
 
 
To
08/08/2000 17:30:18
Gerald McKinsey
Keystone Consulting Services, Inc.
Yorktown, Indiana, United States
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00402536
Message ID:
00402603
Views:
7
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
Previous
Reply
Map
View

Click here to load this message in the networking platform