Single Row SQL.Snapshot

I have several stored procedures that when I execute them they will only return a single snapshot. In my BP I have been setting this to a Snapshot variable then looping using a WHILE through the snapshot variable just to get that single value.

Since it is only a single row, is there an easier way where I don't have to do a WHILE loop to pull the values out of that row? Can I call First Row or something like that to get me just the row into the Snapshot variable?

  • 0
  • 0
  • 169
  • 0
  • 1

Answers

If your'e sure a result set of no more than 1 row will be returned, just call the %Next() method of the Snapshot object. That'll position the cursor on the first (and, hopefully only) row.