tags:

views:

38

answers:

0

I am using a SQL cursor. I want to select the values

Eg:-

While(@@fetchstatus ==0)
BEGIN
  if(cond)
    SELECT rownumber, rowname FROM TABLE
END

ANSWER:-

During the first round of execution of While loop I am getting the value.

1,"Firstrow"(From Row select)

Next

2,"SecondRow"

All these values are displayed in my output as separate rows. Is it possible to combine and display as two outputs like this

1, "FirstRow"

2,"SecondRow"