Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Need to extract data from sql server db
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00704486
Message ID:
00704504
Vues:
22
Hi Munish,

>sSql = "select * from abc where YEAR(calltime)=2002 AND MONTH(CALLTIME)=10 AND day(calltime)=20 INTO TABLE TEMPTABLE"

Obviously you've already gotten the answer. YEAR() and MONTH() are VFP functions and do not exist on SQL Server.

This is one of the reasons I'm NOT a big fan of SQL Passthrough and prefer to use stored procs for all data access and updates.

VFP compiles your code just fine because all it sees is a string even through the code is not correct. If you had a stored proc on the server, you would code it, test it, and then call it from VFP. Any changes to the stored proc would be automatically incorporated into your app and would NOT require a rebuild or redistribution of an EXE.

Just my $0.02...
Jim Duffy
Microsoft MVP
INETA Speaker
TakeNote Technologies
Developer's Choice Award Winner for Best Training Company
Specializing in VB.NET, ASP.NET, VFP, and SQL Server Training and Development
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform