Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Question about report dates
Message
From
22/09/2000 17:16:17
 
 
To
22/09/2000 16:05:02
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00419729
Message ID:
00420080
Views:
25
>OK Here we go. I modified the statement as follows. Now I got the two screens asking for the initial and ending date, but I got the "Function argument value,type or count is invalid" message...
>
>SELECT Ventas.fechaonly, Ventas.totalvta, Ventasdsg.codigonues,;
> Ventasdsg.descripcio;
> FROM scaledata!ventas INNER JOIN scaledata!ventasdsg ;
> ON Ventas.cvevta = Ventasdsg.novta;
> WHERE Ventas.fechaonly BETWEEN CTOD(?date1) AND CTOD(?date2)
>

I bet the problem lies in the use of the CTOD() function, and the date1 and date2 are actually dates and not character strings.

Change the WHERE clause to this and see if it works:

WHERE Ventas.fechaonly BETWEEN ?date1 AND ?date2

>Following up with this question: what other methods, besides a view are there to get the same results?

The same SELECT statement without the "?" before the variables would probably be just fine in this case.
Insanity: Doing the same thing over and over and expecting different results.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform