Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sales ticket query problem

Status
Not open for further replies.

smeyer56

IS-IT--Management
Oct 16, 2002
206
US
I am trying to create a report in 8.5 pro that groups sales based upon whether or not a delivery charge was added to the line items and am not getting it. It is a simple nested SQL statement but if I try this with 100000 records it takes hours and this is not even grouped.

SELECT
TixHeader."TicketNumber",
TixHeader."TicketDate",
TixHeader."SaleAmount"
FROM
"ENGLISH"."TixHeader" TixHeader
WHERE TixHeader."TicketNumber" IN
(SELECT
TixHistLin."TicketNumber"
FROM
"ENGLISH"."TixHistLin" TixHistLin
WHERE
TixHistLin."ItemNumber" LIKE 'DEL%')

Is there a way to do this quickly in Crystal
 
Your best bet is to do this on the database side using a View or SP.

A lessor known alternative, and I'm not advocating it, is to build an ADO connection (More Data Sources->Active Data->ADO->ODBC

Once you've created it, double click it and then you can select SQL and paste in your SQL.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top