Selecting the Row Numbers from a table in a query

  • Hi,

    I am accessing a table in a SQL Server 2k database that does not have a Unique Key Value for each record. Boo Hiss. I will not be able to change that.

    Is there a way to select the Row Number from the table in the following manner where recno is assumed to be the row number value

    Select recno, transactionid, trandate, status from mytable

    I will be running this query as part of a VFP Cursor Adapter which is blowing up because I don't have a unique value. The values in this cursor will be changed similar to:

    Update mytable set status = newvalue where recno =

    Thank you in advance for your assistance,

    Michael

  • Are there no combinations of columns in the table that could constitute a unique key?

    Couldn't transactionid and trandate consitute a unqiue key?

    If you could describe in more detail what it is you want to do then it may be possible to avoid cursors entirely.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply