Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Count command
Message
From
09/05/2003 03:50:21
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00785705
Message ID:
00786648
Views:
25
Hi Andy

I had the same thought as you until someone made it clear to me that there is not any need for such a command. The combination of _tally and the array gives you the answer directly. If you know the answer is only one record, then you can ignore the _tally, and read the value from the array directly.

An example:

SELECT NAME FROM CUSTLIST WHERE RECNO()=25 INTO ARRAY laArray
lcName=laArray

Note that you do NOT have to use laArray(1,1) or laArray(1) in this case, so laArray is the memory varialble you are asking for!

>>> An array IS a variable. What would happen if your code returned more than one row? (I know COUNT only returns one row) <<
>
>You can see I don't like arrays very much!
>I prefer to deal with variables.
>
>I put a "wish" in the Wishlist to send SQL Select to a memory variable.
>It would only work if your code returned one col. and one row;
>else give an error.
>I "believe" SQL Server lets you do this.
Previous
Reply
Map
View

Click here to load this message in the networking platform