Author: Rafael Copquin
Posted: 2011-05-31 at 12:04:28
I am developing a routine that randomly selects inventory items from a
SQL Server table, for inventory control purposes.
The item code is numeric, ie: 2345, 7867, 127435, etc. However, there
are less than 2000 records in the table
So I can apply the vfp rand function like so
RandomNbr = int( rand(-1) * 1987 )
to select a specific record, say 469, which could have an id number like
8976 and contain an item code like 789678
If I were in VFP I would simply locate for recno() = 469 and get the
item code.
But, what is the equivalent to the recno() function in TSQL, if there is
one? And if there is not, how do I get to the particular record?
Rafael Copquin
_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/4DE5118C.9010503@ciudad.com.ar
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.