Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Statement
Message
From
07/04/2021 13:13:29
 
 
To
07/04/2021 11:13:28
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
01679648
Message ID:
01679650
Views:
56
>Hi:
>I'm wanting to populate a listbox with a SQL query.
>In the result I would like a count of the record (like a RECNO()) in the result..
>such as following result:
>1 record data
>2 record data
>3 record data
>
>How do you generate that record number in the result?

You can't do it in a single step, but you can with a subquery. Something like this, where the query that collects the data is the subquery:
SELECT RECNO() AS nPosition, * ;
   FROM ( ;
      SELECT * ;
         FROM Products ;
         ORDER BY ProductName) ProductsAlpha ;
   INTO CURSOR ProductList
Tamar
Previous
Reply
Map
View

Click here to load this message in the networking platform