Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Newbie Question
Message
 
À
28/02/2006 16:23:55
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
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:
01100184
Vues:
12
Check this

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/acdata/ac_8_qd_14_04j7.asp

http://www.sqlservercentral.com/faq/viewfaqanswer.asp?categoryid=3&faqid=166

Hope it helps!


>>This can be done in a single command, more or less like this:
>
>
>>select ItemName,;
>> sum(iif(month(DateField) = 1, ValueField, $0)) as Jan,;
>> sum(iif(month(DateField) = 2, ValueField, $0)) as Feb,;
>> ...
>
>Thanks Hilmar,
>
>I'm using VFP to connect to an SQL database via ODBC so I can't use the IIF() because it's not understood by the ODBC connect. Ultimately, once I figure out how to write this SQL (that's compatible with MSQ 6.5), I then need to move it to Excel & MS Query to pull the data directly into the spreadsheet. The people that need this data don't have a copy of VFP and I don't want to get involved in creating and distributing EXE's.
>
>Thanks,
>Robert
I'm a mixture of Albert Einstein and Arnold Schwarzenegger. The only trouble is that I got Einstein's body and Schwarzenegger's brain
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform