cancel
Showing results for 
Search instead for 
Did you mean: 

Re: Help in Query

Former Member
0 Kudos

Dear Experts,

I need help in below query.. when i was tried it shown an error message:



INV1, Itemcode | INV1, Dscription | ORDR, NumAtCard | POR1, Quantity/ OITM, SalpackUN | INV1, Quantity/OITM, SalpackUN


Selection Criteria:

 1. OINV, Docdate greater than and 

 2. OINV, Docdate Smaller than and 

 3. OINV, CardName 

Please kindly help me out....

Thanks and Regards,

Manikandan

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Mani,

You are querying the Sales Orders (ORDR, RDR1), Purchase Orders (OPOR, POR1) and A/R Invoices (OINV, INV1) tables.

What information are you trying to achieve that requires such a query? I ask this because I don't know if there is a direct connection between the Sales and Purchase documents and, in case there isn't, you won't get any usable results.

Best Regards,

Vítor Vieira

Former Member
0 Kudos

Hi Vieira,

I made a mistake in that posting.... Plz kindly look at the bellow query..




INV1, Itemcode | INV1, Dscription | ORDR, NumAtCard |  INV1, Quantity/OITM, SalpackUN
 
 
Selection Criteria:
 
 1. OINV, Docdate greater than and 
 
 2. OINV, Docdate Smaller than and 
 
 3. OINV, CardName 

Thanks and Regards,

Manikandan

Former Member
0 Kudos

hi

SELECT INV1.ItemCode, INV1.Dscription, OINV.NumAtCard, (INV1.Quantity / OITM.SalPackUn)

FROM OINV INNER JOIN

INV1 ON OINV.DocEntry = INV1.DocEntry INNER JOIN

OITM ON INV1.ItemCode = OITM.ItemCode where oinv.docdate > [%0] and oinv.docdate < [%1] and oinv.Cardname=[%2]

Regards

Former Member
0 Kudos

Hi Mani,

Please use the query Parminder kaur provided, but copy it from my post (Parminder did't use the code tags and his query is missing some characters


SELECT 
     INV1.ItemCode, INV1.Dscription, OINV.NumAtCard, (INV1.Quantity / OITM.SalPackUn)
FROM 
     OINV INNER JOIN
     INV1 ON OINV.DocEntry = INV1.DocEntry INNER JOIN
     OITM ON INV1.ItemCode = OITM.ItemCode 
WHERE
     OINV.DocDate BETWEEN '[%0]' AND '[%1]' AND OINV.CardName = '[%2]'

Regards,

Vítor Vieira