Environment versions
Network:
Windows 2003 Server
Roy,
That is correct. You have to use desc when getting the previous row. Also, I got burned by doing this on a list of names when there was multiple names the same. It will skip all the same names and to the next one that is different. Good luck.
>Thanks for the responses,
>
>James, I also tried that and worked pretty good for the "next" but for "previous" I was having some problems but you just gave me a good idea using the asc. For example for the previous I had tried.
>
>select top 1 * from mytable where mycolumn < 'last_col_value'
>
>But obviously it grabs the very first record but if I change the asc/desc order to what I want I probably can get the previous record. Let me try it, thanks!
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only