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!
|