|
![](/images/resource/spacer.gif) |
|
ช่วยด้วยครับ วนตรงนี้ยังไงครับเพื่อให้ได้ผลลัพธ์ดังนี้ครับ รหัสลูกค้า.......1......... ปี |
|
![](/images/resource/viewboard_01.gif?v=1001) |
|
|
![](/images/resource/viewboard_03.gif?v=1001) |
![](/images/resource/viewboard_04.gif?v=1001) |
|
<!-- #include virtual="dbconnect.asp"-->
<%
'Set rs=Server.Createobject("ADODB.Connection")
Set rs =Server.CreateObject("ADODB.Recordset")
sql="SELECT YEAR(DocDate) AS Expr3, MONTH(DocDate) AS Expr2, ArCode, "&_
"SUM(TotalAmount) AS Expr1 FROM BCARINVOICE WHERE (IsCancel <> 1) "&_
"GROUP BY YEAR(DocDate), MONTH(DocDate), ArCode "&_
"ORDER BY YEAR(DocDate), MONTH(DocDate), ArCode;"
rs.Open sql,conn,1, 3 %>
<%
If Rs.EOF Then
%>
äÁèÁÕ¢éÍÁÙÅã¹µÒÃÒ§ !
<%Else%>
<body>
<table width="800" border="1">
<tr>
<td><table width="800" border="1">
<tr> <% DO While Not Rs.EOF%>
<td>ª×èÍ<%= Rs("arcode")%></td>
</tr>
<tr>
<td><table width="800" border="1">
<tr>
<td width="68">»Õ</td>
<td width="69">1</td>
<td width="70">2</td>
<td width="48">3</td>
<td width="48">4</td>
<td width="48">5</td>
<td width="48">6</td>
<td width="48">7</td>
<td width="48">8</td>
<td width="48">9</td>
<td width="48">10</td>
<td width="48">11</td>
<td width="59">12</td>
</tr>
<tr>
<td><%= Rs("expr3")%></td>
<td><%= Rs("expr1")%></td>
วนตรงนี้ยังไงครับเพื่อให้ได้ผลลัพธ์ดังนี้ครับ
รหัสลูกค้า.......1.........
ปี 1 2 3 4 5 6 7 8 9 10 11 12
2005 1000 1500 300
2006 2000 2100 1700
</tr>
</table></td>
</tr> <% Rs.MoveNext
Loop
Rs.Close
Conn.Close
End If%>
</table>
</td>
</tr>
</table>
Tag : - - - -
![](/images/adv.jpg?v=1001)
|
|
![](/images/resource/blockviewtopic_01.gif?v=1001) |
![](/images/resource/blockviewtopic_02.gif?v=1001) |
![](/images/resource/blockviewtopic_03.gif?v=1001) |
![](/images/resource/blockviewtopic_04.gif?v=1001) |
Date :
4 มิ.ย. 2549 21:51:49 |
By :
kao |
View :
1913 |
Reply :
0 |
|
![](/images/resource/blockviewtopic_06.gif?v=1001) |
![](/images/resource/blockviewtopic_07.gif?v=1001) |
![](/images/resource/blockviewtopic_08.gif?v=1001) |
![](/images/resource/blockviewtopic_09.gif?v=1001) |
|
|
|
![](/images/resource/viewboard_06.gif?v=1001) |
![](/images/resource/viewboard_07.gif?v=1001) |
|
![](/images/resource/viewboard_08.jpg?v=1001) |
![](/images/resource/viewboard_09.gif?v=1001) |
|
|
![](/images/digitalocean-banner.jpg)
|
Load balance : Server 01
|