Skip to Content
author's profile photo Former Member
Former Member

Problems in extracting old records in crystal report invoice template

I have made the following SQL query. But for some reason, I am not able to see any invoices older than September 2011. I havent given any criteria or filters for the dates. I do know that there were loads of item invoices posted since 2009. Can anyone help me with this a.s.a.p.

My SQL Query:

SELECT DISTINCT "OINV"."DocNum", "OINV"."DocDate", "OINV"."CardCode", "INV1"."ItemCode", "INV1"."Dscription", "INV1"."Price", "INV1"."DiscPrcnt", "INV1"."Quantity", "INV1"."LineTotal", "INV1"."LineVat", "INV1"."ShipDate", "OINV"."DocTotal", "OINV"."VatSum", "INV1"."BaseRef", "OINV"."NumAtCard", "OINV"."Address", "OINV"."CardName", "OINV"."TotalExpns", "OINV"."Address2", "OINV"."DocEntry", "OINV"."GroupNum", "OINV"."ExtraDays", "OINV"."CntctCode", "OINV"."DocDueDate"
FROM "Live"."dbo"."OINV" "OINV" INNER JOIN "Live"."dbo"."INV1" "INV1" ON ("OINV"."OwnerCode"="INV1"."OwnerCode") AND ("OINV"."DocEntry"="INV1"."DocEntry")
ORDER BY "OINV"."DocNum"

Thank you very much in advance for looking into this for me.

R

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Jul 16, 2012 at 01:45 PM

    there is no WHERE condition which makes me think that either one or both tables don't have any records for years 2009/2010

    have you checked the raw data?

    thanks

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.