求一ORACLE行转列SQL???(100分)

  • 主题发起人 主题发起人 FFCA
  • 开始时间 开始时间
F

FFCA

Unregistered / Unconfirmed
GUEST, unregistred user!
表如下:<br>id1 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;id2<br>1 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;a<br>1 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;b<br>2 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;c<br>2 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;d<br>现想转换成:<br>1 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;a &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; b<br>2 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;c &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; d<br>其中,a,b,c,d数据是变化的 &nbsp; &nbsp;<br>急,在线等!!
 
你这个结果不确定<br><br>也可以转化成: <br>1 &nbsp;b a<br>2 &nbsp;d c <br>?<br><br>也可以<br>1 a b<br>2 d c<br>?<br><br>所以应该没有现成的sql能解决这个事情~
 
to:Tophi<br>转成你所说的任何一种都行,这个不影响。<br>怎么做?
 
应为不确定性,所以做不了呵呵:)<br>哪有sql结果是不确定的?
 

Similar threads

D
回复
0
查看
2K
DelphiTeacher的专栏
D
D
回复
0
查看
2K
DelphiTeacher的专栏
D
D
回复
0
查看
1K
DelphiTeacher的专栏
D
后退
顶部