Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Newbie Question
Message
De
28/02/2006 15:42:23
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
SQL Newbie Question
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows NT
Database:
MS SQL Server
Divers
Thread ID:
01100105
Message ID:
01100105
Vues:
54
I need to create a query that will provide 12 months of data that can be dropped into a spreadsheet via _vfp.dataclip(,,3) function. The results should look something like:

JAN FEB MAR APR MAY JUN JUL AUG SEP OCT NOV DEC
ITEM1 12 13 9 12 6 21 13 15 12 16 9 12
ITEM2 9 10 10 14 10 17 15 16 17 17 12 18
ITEM3 11 17 16 16 16 23 12 14 16 18 20 17
ETC ..

The only way I know to acquire this data is to run a SQL query with a monthly date range 12 times. I know there must be a way to write a single SQL statement that would pull all of this data at once but I'm not sure how to construct it.

Anyone available to give me an example of how to do this?

Thanks,
Robert Wright
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform