Line ID in Record Set

  • Is there a way to get a query to return a Line ID?  I am using Access as a front end with a SQL Server backend.  I am pulling data using a stored procedure and using a Record Set in Access to put the data into a continuous form.  Is there any way to have the query return a Line ID for each item?

  • One of the easiest and fastest ways is to dump the query results into a temp table that has a "line ID" column that is an IDENTITY column... in ACCESS, it would be an "auto-numbering" column.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

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

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