New to SQL and need some guidance please.
I am trying to loop through a data set using the ROW_NUMBER function. I only care what the data is for the first three results in the result set. Here is my query:
I am receiving the following error, which indicates that I can not populate a variable while using ROW_NUMBER. Grrr....
Thoughts as to how I can accomplish this?? As I stated, I am NEW to SQL and trying desperately to learn! Thanks in advance for any input.
Thanks.... I figured it out. Had to use a cursor.
answered Apr 18 at 01:59 PM