Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old February 28th, 2007, 05:45 PM
Nitin
Guest
 
Posts: n/a
Default Asp query (SQL Related)


I have two resultset in asp as follows

database is sql

AttributeText

700 Kbps
128 Kbps
$59.99
15 Months
15 Months
$499.98
- $100
$399.98

1 Mbps
200 Kbps
$69.99
15 Months
15 Months
$499.98
- $100
$399.98

1.5 Mbps
200 Kbps
$79.99
15 Months
15 Months
$499.98
- $100
$399.98

1.5 Mbps
300 Kbps
$99.99
15 Months
15 Months
- $100
$699.98

2.0 Mbps
500 Kbps
$179.99
15 Months
15 Months
$799.98
- $100
$699.98

Attribute Description

Max. Download Speed
Max. Upload Speed
Monthly Fees
Term Commitment
Hardware Warranty
Equipment and Standard Installation
Mail-In Rebate
Your Final Cost


I want to display output as follows

Max. Download Speed 700 Kbps 1
Mbps 1.5 Mbps -- --
Max. Upload Speed 128 Kbps 200
Kbps 200 Kbps -- --
Monthly Fees $59.99
$69.99 $79.99 -- --
Term Commitment 15 Months 15
Months 15 Months -- --
Hardware Warranty 15 Months 15
Months 15 Months -- --
Equipment and Standard Installation $499.98 $499.98
$499.98 -- --
Mail-In Rebate - $100 -
$100 - $100 -- --
Your Final Cost $399.98
$399.98 $399.98 -- --

Is this possible with asp code or i will have to change my database
design

Thanks in advance

Nitin

  #2  
Old February 28th, 2007, 05:55 PM
AlterEgo
Guest
 
Posts: n/a
Default Re: Asp query (SQL Related)

Nitin,

Assuming your database is designed properly, don't change your database to
accomodate presentation requirements. Change your presentation layer to
re-format the data. Yes, you have a great deal of flexibility in ASP to
accomplish this.

-- Bill


"Nitin" <nitinroman@gmail.comwrote in message
news:1172683891.577882.78150@q2g2000cwa.googlegrou ps.com...
Quote:
>
I have two resultset in asp as follows
>
database is sql
>
AttributeText
>
700 Kbps
128 Kbps
$59.99
15 Months
15 Months
$499.98
- $100
$399.98
>
1 Mbps
200 Kbps
$69.99
15 Months
15 Months
$499.98
- $100
$399.98
>
1.5 Mbps
200 Kbps
$79.99
15 Months
15 Months
$499.98
- $100
$399.98
>
1.5 Mbps
300 Kbps
$99.99
15 Months
15 Months
- $100
$699.98
>
2.0 Mbps
500 Kbps
$179.99
15 Months
15 Months
$799.98
- $100
$699.98
>
Attribute Description
>
Max. Download Speed
Max. Upload Speed
Monthly Fees
Term Commitment
Hardware Warranty
Equipment and Standard Installation
Mail-In Rebate
Your Final Cost
>
>
I want to display output as follows
>
Max. Download Speed 700 Kbps 1
Mbps 1.5 Mbps -- --
Max. Upload Speed 128 Kbps 200
Kbps 200 Kbps -- --
Monthly Fees $59.99
$69.99 $79.99 -- --
Term Commitment 15 Months 15
Months 15 Months -- --
Hardware Warranty 15 Months 15
Months 15 Months -- --
Equipment and Standard Installation $499.98 $499.98
$499.98 -- --
Mail-In Rebate - $100 -
$100 - $100 -- --
Your Final Cost $399.98
$399.98 $399.98 -- --
>
Is this possible with asp code or i will have to change my database
design
>
Thanks in advance
>
Nitin
>

  #3  
Old February 28th, 2007, 06:25 PM
Larry Linson
Guest
 
Posts: n/a
Default Re: Asp query (SQL Related)

This newsgroup is for questions, answers, and discussions of Microsoft
Access database software, and your question does not deal with that
software. You "got lucky" and received one (very good and accurate)
response, but you'll have better luck getting useful responses if you post
ASP-with-SQL-Server questions in a newsgroup dealing with that subject.
Good luck.

Larry Linson
Microsoft Access MVP

"Nitin" <nitinroman@gmail.comwrote
Quote:
>
I have two resultset in asp as follows
>
database is sql

  #4  
Old February 28th, 2007, 11:55 PM
chris.nebinger@gmail.com
Guest
 
Posts: n/a
Default Re: Asp query (SQL Related)

You could do:


<%
rst.open SQLSTATEMENT, CONNECTION
%>
<table>
<tr>
<%
For i = 0 to rst.fields.count-1
response.write "<th>" & rst.fields(i).Name & "</th>"
Next
%>
</tr>
<%
Do until rst.eof
response.write "<tr>"
For i = 0 to rst.fields.count-1
response.write "<td>" & rst.fields(i).Value& "</td>"
Next
response.write "</tr>"
rst.movenext
loop
%>



Chris Nebinger

On Feb 28, 11:12 am, "Larry Linson" <boun...@localhost.notwrote:
Quote:
This newsgroup is for questions, answers, and discussions of Microsoft
Access database software, and your question does not deal with that
software. You "got lucky" and received one (very good and accurate)
response, but you'll have better luck getting useful responses if you post
ASP-with-SQL-Server questions in a newsgroup dealing with that subject.
Good luck.
>
Larry Linson
Microsoft Access MVP
>
"Nitin" <nitinro...@gmail.comwrote
>
Quote:
>
I have two resultset in asp as follows
>
database is sql

  #5  
Old March 1st, 2007, 12:05 AM
chris.nebinger@gmail.com
Guest
 
Posts: n/a
Default Re: Asp query (SQL Related)

OOPS, I really need to read closer. Assuming rst is the field names,
and rst1 is the values:
(Also, assuming classic asp. If it's .net, i can post that code too.)

<%
rst.open "SELECT FIELDNAMES",connection
rst1.open "SELECT FIELD VALUES", connection
response.write "<Table>"
response.write "<tr>"
do until rst.eof
response.write "<td>" & rst(0) & "</td>"
rst.movenext
loop
response.write "</tr>"
response.write "<tr>"
do until rst.eof


rst.movenext
loop

Okay, i'm not sure of the format. How are you linking the fields?
Looking at your data, is there a record with a blank to delineate the
data? I guess I'm not sure how that would work. Could you give more
info on the values?


Chris

On Feb 28, 4:39 pm, "chris.nebin...@gmail.com"
<chris.nebin...@gmail.comwrote:
Quote:
You could do:
>
<%
rst.open SQLSTATEMENT, CONNECTION
%>
<table>
<tr>
<%
For i = 0 to rst.fields.count-1
response.write "<th>" & rst.fields(i).Name & "</th>"
Next
%>
</tr>
<%
Do until rst.eof
response.write "<tr>"
For i = 0 to rst.fields.count-1
response.write "<td>" & rst.fields(i).Value& "</td>"
Next
response.write "</tr>"
rst.movenext
loop
%>
>
Chris Nebinger
>
On Feb 28, 11:12 am, "Larry Linson" <boun...@localhost.notwrote:
>
>
>
Quote:
This newsgroup is for questions, answers, and discussions of Microsoft
Access database software, and your question does not deal with that
software. You "got lucky" and received one (very good and accurate)
response, but you'll have better luck getting useful responses if you post
ASP-with-SQL-Server questions in a newsgroup dealing with that subject.
Good luck.
>
Quote:
Larry Linson
Microsoft Access MVP
>
Quote:
"Nitin" <nitinro...@gmail.comwrote
>
Quote:
Quote:
I have two resultset in asp as follows
>
Quote:
Quote:
database is sql- Hide quoted text -
>
- Show quoted text -

 

Bookmarks

Thread Tools

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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles