Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using MAX in SPT
Message
 
To
09/03/2005 09:01:47
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00993971
Message ID:
00993978
Views:
13
This message has been marked as the solution to the initial question of the thread.
Probably you need this instead:
tsconnstr = "Select TS" + AllT(Str(Year(Date()))) + ;
   "- + Str(Int(Max(Val(SubStr(tsindex,8,15))))) InTo Cursor myNextIndex"
....
Then VFP may see the difference between MAX() vfp function and MAX FIELD field function in SQL expression.

>I am trying to code a SQL string to pick the Max value in a remote table.
>
>My string:
>
>tsconnstr = "Select TS" + AllT(Str(Year(Date()))) + "-" + Str(Int(Max(Val(SubStr(tsindex,8,15))))) + " InTo Cursor myNextIndex"
>
>I am getting an error "Too Few Arguments" It seems like the Max() is causing the problem.
>
>Please help.
Previous
Reply
Map
View

Click here to load this message in the networking platform