3,499
社区成员
发帖
与我相关
我的任务
分享
select decode(rn,1,QN,null) QN,t.ON
from
(
Select Question.QuestionName QN,
Option.OptionName ON,
number()over(order by Question.QuestionName parttion by Question.QuestionName) as rn
from Question a,
Option b
where a.QuestionID = b.QuestionID
) t
select decode(rn,1,QN,null) QN,t.ON
from
(
Select Question.QuestionName QN,
Option.OptionName ON,
rownum as rn
from Question a,
Option b
where a.QuestionID = b.QuestionID
and a.QuestionID=1
) t
QN ON
-- --
q1 25
28
32
95
85
<html>
<head>
<title>llll</title>
</head>
<body>
<div id="aa"></div>
<h3>请输入要输入的表格的列数和行数:</h3>
行:<input type=text name="text1">
<br>
列:<input type=text name="text2">
<input type="button" value="提交" onclick="createtable()">
<h3>请输入两个数字</h3>
<h3>合并单元格:</h3>
从<input type=text name="text3">行 <input type=text name="text4">列开始
<br>
合并<input type=text name="text5">行 <input type=text name="text6">列
<br>
<input type="button" value="合并" onclick="changetable()">
<script>
var i,j,tmp,l,r;
function createtable()
{
tmp="<table border=1 width=5% id = aaa>"
l=document.all.text1.value;
r=document.all.text2.value;
for(j=0;j<l;j++)
{
tmp=tmp+"<tr>"
for(i=0;i<r;i++)
{
tmp=tmp+"<td>"
tmp=tmp+"USE"
tmp=tmp+"</td>"
}
tmp=tmp+"</tr>"
}
tmp=tmp+"</table>"
aa.innerHTML=tmp
}
function changetable(){
var tab = document.all.aaa;
if(tab){
l=document.all.text3.value;
r=document.all.text4.value;
var obj = document.all.aaa.childNodes(0).childNodes(l-1).childNodes(r-1);
row=document.all.text5.value;
col=document.all.text6.value;
with(obj){
colSpan = col;
rowSpan = row;
}
var tbody = document.all.aaa.childNodes(0);
if(col>1){
obj.nextSibling.removeNode();
}
for (var m = 0; m <row-1 ; m++)
{
for (var n = 0; n < col; n++ )
{
indexRow = eval(m+"+"+l);
indexCol = eval(n+"+"+r+"-"+"1");
tbody.childNodes(indexRow).childNodes(indexCol).removeNode();
}
}
}else{
alert("no table");
}
}
</script>
</body>
</html>
select decode(rn,1,QN,null) QN,t.ON
from
(
Select Question.QuestionName QN,
Option.OptionName ON,
rownum as rn
from Question a,
Option b
where a.QuestionID = b.QuestionID
and a.QuestionID=1
) t
select decode(rn,1,QN,
null) QN
t.ON
from
(
Select Question.QuestionName QN,
Option.OptionName ON,
rownum as rn
from Question a,
Option b
where a.QuestionID = b.QuestionID
and a.QuestionID=1
) t
where
select t.QN
wmsys.wm_concat(t.ON) as ON
from
(
Select Question.QuestionName QN,
Option.OptionName ON
from Question a,
Option b
where a.QuestionID = b.QuestionID
and a.QuestionID=1
) t
group by t.QN;
select t.QN,
t.ON
from
(
Select Question.QuestionName QN,
Option.OptionName ON,
rownum as rn
from Question a,
Option b
where a.QuestionID = b.QuestionID
and a.QuestionID=1
) t
where t.rn = 1