a webmaster learning community
     Home    Register     Search      Help      Login    
FrontPage Alternative
Sponsors

Hosting from $3.99 per month!

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions. dd

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

 

only showing top 3 results

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> only showing top 3 results
Page: [1]
 
adam2804

 

Posts: 34
Joined: 6/6/2006
Status: offline

 
only showing top 3 results - 8/1/2006 5:41:31   
Hello people,

I have a table that should be showing 8 results (as I have run the exact same query in Enterprise manager) but when I put it into Front Page bizarrely it only shows the top 3 results. Has anyone experienced this before and does anyone know what causes this? It's really confusing me, but am convinced it's something simple that I'm not doing.

Help!!

<%
fp_sQry="SELECT     TOP 100 PERCENT FN_InvoiceList.ContractNum, FN_InvoiceList.ContractStart, FN_InvoiceList.ContractEnd, FN_InvoiceList.ContractValue, FN_InvoiceList.ContractNumberOfPayments, FN_InvoiceList.InvoiceValue, FN_InvoiceList.PaymentNumber, FN_InvoiceList.TASCode, FN_InvoiceList.InvoicedToTAS, MAX(dbo.TB_Invoice.Invoice_ID + 1) AS NextInvoiceNumber, FN_InvoiceList.Description, FN_InvoiceList.SupportContract_ID FROM         dbo.FN_InvoiceList(DEFAULT) FN_InvoiceList CROSS JOIN dbo.TB_Invoice GROUP BY CAST(FN_InvoiceList.PaymentNumber AS VARCHAR(5)) + '/' + CAST(FN_InvoiceList.ContractNumberOfPayments AS VARCHAR(5)), FN_InvoiceList.Customer, FN_InvoiceList.ContractNum, FN_InvoiceList.ContractStart, FN_InvoiceList.ContractEnd, FN_InvoiceList.ContractValue, FN_InvoiceList.ContractInvoiceDays, FN_InvoiceList.ContractNumberOfPayments, FN_InvoiceList.InvoiceValue, FN_InvoiceList.InvoiceDate, FN_InvoiceList.InvoicePeriodStart, FN_InvoiceList.InvoicePeriodEnd, FN_InvoiceList.InvoiceDuration, FN_InvoiceList.PaymentNumber, FN_InvoiceList.PaymentTerms, FN_InvoiceList.AccountMgr, FN_InvoiceList.TASCode, FN_InvoiceList.InvoicedToTAS, FN_InvoiceList.Description, FN_InvoiceList.SupportContract_ID HAVING      (FN_InvoiceList.InvoiceDate >= CONVERT(DATETIME, '2006-07-01 00:00:00', 102)) AND (FN_InvoiceList.InvoiceDate <= CONVERT(DATETIME, '2006-07-31 00:00:00', 102))"
fp_sDefault=""
fp_sNoRecords="<tr><td colspan=9 align=""LEFT"" width=""100%"">No records returned.</td></tr>"
fp_sDataConn="database"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice="ContractNum"
fp_sMenuValue="ContractNum"
fp_sColTypes="&ContractNum=200&ContractStart=135&ContractEnd=135&ContractValue=131&ContractNumberOfPayments=3&TASCode=200&Payment=200&Description=200&InvoicedToTAS=11&"
fp_iDisplayCols=9
fp_fCustomQuery=True
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="../../_fpclass/fpdbrgn1.inc"-->
<tr>
			<td>
			<%=FP_FieldVal(fp_rs,"ContractNum")%></td>
			<td>
			<%=FP_FieldVal(fp_rs,"ContractStart")%></td>
			<td>
			<%=FP_FieldVal(fp_rs,"ContractEnd")%></td>
			<td>
			<%=FP_FieldVal(fp_rs,"ContractValue")%></td>
			<td>
			<%=FP_FieldVal(fp_rs,"ContractNumberOfPayments")%></td>
			<td>
			<%=FP_FieldVal(fp_rs,"TASCode")%></td>
			<td>
			<%=FP_FieldVal(fp_rs,"PaymentNumber")%></td>
			<td>
			<%=FP_FieldVal(fp_rs,"Description")%></td>
			<td>
			<%=FP_FieldVal(fp_rs,"InvoicedToTAS")%></td>
			<td>
			<a href="raise_invoice.asp?InvoiceID=<%=FP_FieldVal(fp_rs,"NextInvoiceNumber")%>&SupportContractID=<%=FP_FieldVal(fp_rs,"SupportContract_ID")%>&PaymentNo=<%=FP_FieldVal(fp_rs,"PaymentNumber")%>&InvoiceValue=<%=FP_FieldVal(fp_rs,"InvoiceValue")%>&InvoiceDate=<%=Now()%>">Raise Invoice</a></td>
		</tr>
		<!--#include file="../../_fpclass/fpdbrgn2.inc"-->
</tbody>
</table>


Thanks in advance!
rdouglass

 

Posts: 9280
From: Biddeford, ME USA
Status: offline

 
RE: only showing top 3 results - 8/1/2006 9:49:23   
quote:

fp_sQry="SELECT TOP 100 PERCENT FN_InvoiceList.ContractNum


Have you tried just that to see if you get all?

Also, have you tried just:

fp_sQry="SELECT FN_InvoiceList.ContractNum....

(with no TOP 100 PERCENT).

How about with no "HAVING" conditions?

(I'm just trying to break this query down into small er pieces.)

_____________________________

Don't take you're eye off your final destination.

ASP Checkbox Function Tutorial.

(in reply to adam2804)
Page:   [1]
OutFront Discoveries

All Forums >> Web Development >> ASP and Database >> only showing top 3 results
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts