If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Microsoft SQL Server > How can i write this store procedure

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-11-04, 11:38
wlj_sh wlj_sh is offline
Registered User
 
Join Date: Jan 2004
Posts: 10
How can i write this store procedure

sql result:

startdate enddate price
2004-1-2 2004-1-4 677
2004-1-5 2004-1-8 900
2004-1-9 2004-1-12 2000


i want display in page this format:
2004-1-2 2004-1-3 2004-1-4 2004-1-5 ... 2004-1-12
677 677 677 900 2000

how can i write store procedure
Reply With Quote
  #2 (permalink)  
Old 01-11-04, 15:17
gyuan gyuan is offline
Registered User
 
Join Date: Dec 2003
Posts: 454
This post is almost the same as the one you posted at Dynamic table

If there are two fields in the record set, the code is

<table>
<%dim row1 : row1="<tr>"%>
<%dim row2 : row2="<tr>"%>
<%for not rs.eof then%>
<%row1 = row1 & "<td>" & rs("field1") & "</td>"%>
<%row2 = row2 & "<td>" & rs("field2") & "</td>"%>
<%next%>
<%row1 = row1 & "</tr>"%>
<%row2 = row2 & "</tr>"%>
</table>

Last edited by gyuan; 01-11-04 at 15:20.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On