(DEAD) How to merge rows in the same table? | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

(DEAD) How to merge rows in the same table?

Nevermind.
This won’t be feasible in my case due to data integraty issue.
I’m not a developer.
Ony way I see is having a same key for each question and his answer.
I suggest wait for anothers members. Luis Martin …Thus mathematics may be defined as the subject in which we never know what we are talking about, nor whether what we are saying is true.
Bertrand Russell
IF the id in your table goes one right after an other (1,2,3,4,5,6…) then you can do this : SELECT * FROM
(SELECT ID,TYPE,REV FROM TESTA A WHERE TYPE=’A’ )A,
(SELECT ID,TYPE,REV FROM TESTA A WHERE TYPE=’B’ )B
WHERE B.ID=A.ID+1
<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote"><i>Originally posted by NewDBA</i><br /><br />IF the id in your table goes one right after an other (1,2,3,4,5,6…)<br /><br />then you can do this :<br /><br />SELECT * FROM<br />(SELECT ID,TYPE,REV FROM TESTA A WHERE TYPE=’A’ )A,<br />(SELECT ID,TYPE,REV FROM TESTA A WHERE TYPE=’B’ )B<br />WHERE B.ID=A.ID+1<br /><hr height="1" noshade id="quote"></blockquote id="quote"></font id="quote"><br /><br />unfortuately, they aren’t <img src=’/community/emoticons/emotion-6.gif’ alt=’:(‘ />
]]>