Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9076

Re: Query Adding Issue

$
0
0

Hi Amol,

 

Are you getting any result from the above query? The above query will not work due to improper join between tables.

 

Basically you need details from Production order with condition of particular series and user.

 

Try this query and let me know the result.

 

SELECT T0.[Series], T0.[DocNum], T0.[ItemCode], T2.[ItemName], T0.[PostDate], T0.[DueDate], T0.[Status], T0.[OriginType], T0.[PlannedQty], T0.[CmpltQty], T0.[RjctQty], T0.[PlannedQty] - T0.[CmpltQty] - T0.[RjctQty], T3.[ItmsGrpNam], T5.[U_NAME], T1.[CardName], T0.[OriginNum] FROM OWOR T0  INNER JOIN OCRD T1 ON T0.CardCode = T1.CardCode INNER JOIN OITM T2 ON T1.CardCode = T2.CardCode INNER JOIN OITB T3 ON T2.ItmsGrpCod = T3.ItmsGrpCod INNER JOIN NNM1 T4 ON T0.Series = T4.Series INNER JOIN OUSR T5 ON T0.UserSign = T5.USERID WHERE T0.[ItemCode] = T2.[ItemCode] and T0.[UserSign] = T5.userId and  T4.[Series] =  T0.[Series] and  ((T0.[PostDate] >= '[%0]' and T0.[PostDate] <= '[%1]') or ('[%0]' = '' and '[%1]' = '')) and T0.[Series] = [%2]

 

 

Thanks & Regards,

Nagarajan

 


Viewing all articles
Browse latest Browse all 9076

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>