Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Fatal Error from SQL Statement???
Message
De
06/07/2005 09:45:32
 
 
À
06/07/2005 09:33:43
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01029177
Message ID:
01029427
Vues:
10
>>>Hello All;
>>>
>>> I have a simple select statement on a table that just continues to error out on me(Fatal Error: Exception Code C0000005), but the SQL Statement is soooo simple, it just doesnt make any sense at all! Here is the SQL Statement:
>>>
>>>SELECT ;
>>> slsv, ;
>>> Notes, ;
>>> AcctNum, ;
>>> Buyer,;
>>> Call1AGt, ;
>>> Call2Agt, ;
>>> Call3Agt, ;
>>> Call4Agt, ;
>>> Call5Agt, ;
>>> Status, ;
>>> LastCall, ;
>>> Phone1, ;
>>> Phone2 ;
>>> FROM Xcaller ;
>>> WHERE LastCall Between(CallDate,(date()-nDaysback), Date()) ;
>>> INTO TABLE C:\TEMP\CALLTMP1
>>>
>>>Nothing crazy in there, pretty straight forward, right?? so what am I missing Guys?(and Gals ofcourse)
>>
>>WHERE clause is invalid. it must be:
>>
>>WHERE Between(LastCall ,(date()-nDaysback), Date())
>>
>>
>>or something else but not: WHERE LastCall Between(CallDate,(date()-nDaysback), Date()) ;
>>
>>What type is LastCall field?
>
>The LastCall Field is a Date field... it is a valid statement.

The point is that BETWEEN is a function, and your syntax is completely wrong. Correct syntax is Between(yourfield,value1,value2).
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform