Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Recno() in SqlServer
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00524277
Message ID:
00524353
Views:
15
>>Good Morning,
>>
>>How do you get the record number of a cursor record in SQL Server.
>>
>>It should be so easy but I can't find it in the help files.
>>
>>Thanks in advance for your kind assistance,
>>
>>Michael Brennan-White
>
>
>There is no concept of record number in SQL Server. It is a set oriented DB not record oriented as VFP (DBF). You cannot do a query "SELECT * FROM MyTable WHERE Recno() = lnRecno".
>
>OTOH, once you get a result set into a VFP cursor or table then you can use record numbers there, but why would you? Record numbers should not matter as they are moving targets (with deletions and all).

Thanks for the Reply,

In this circumstance, I am creating a SQL cursor on a SQL database (which is so much more work than in FoxPro) to find all names with multiple addresses. I am doing a While Statement to loop through these records.

I would then create a second cursor to loop through all the address records associated with the Name record and ensure that only the first record is marked as the primary address. This is necessary because of bad data.

This has to be remotely for a server I don't have access to through SQL Server so I am creating the SQL statement for them to run through SQL Query Analyzer.

Thanks for all your help,

Michael Brennan-White
Send me an email when the shouting stops
Previous
Reply
Map
View

Click here to load this message in the networking platform