|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
.ASP and SQL
<!-- text goes here -->
<% sql = "SELECT top 5 CONVERT(varchar(12), date_billedThru, 101) AS BillDate, InvoiceNumber, RTRIM(Snapshot_File) AS Snapshot_File, RTRIM(Snapshot_Path) AS Snapshot_Path FROM vw_bill WITH (nolock) where customer_id = (select customer_id from tbl_custsummary_local where btn = '" & request("BTN") & "') order by date_billedThru desc" set rs = webConn.execute(sql) if rs.eof then response.write "<u>No Billing Records found for this Telephone Number</u>" else response.write "The following is a list of the last 5 bills recieved for Telephone Number <b>" & request("BTN") & "</b><br><br>" end if do while not rs.eof tmpPath = replace(rs("Snapshot_path"), "\", "") & "/" & replace(right(rs("Snapshot_File"),len(rs("Snapshot_File"))-1), "snp", "pdf") response.write " <a target=new href=""" & tmpPath & """>" & rs("BillDate") & "</a>" & "<br>" rs.movenext loop rs.close set rs = nothing webConn.close set webConn = nothing %> <p></p> <!-- text stops here --> how do I set this code so that it doesnt make the call to get the last 5 bills online but rather so that it makes a call to pull a single value? Thanks! ![]() |
|
#2
|
|||
|
|||
|
MS SQL has the ROWCOUNT function. Are you wanting a single row or a single value?
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > .ASP and SQL |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|