Skip to Content
0
Former Member
Dec 30, 2011 at 09:06 AM

GRPO query

12 Views

Hai

Below this QUERY i neeed to ADD U_NAME field in OUSR TABLE. I will ADD This Field But When I will run the QUERY ERROR has to come

How do i will ADD ??

SELECT DISTINCT(T0.[DocNum]) AS 'GRN NO', T0.[DocDate] AS 'GRN DATE', T0.[NumAtCard] as 'Ref. No',T0.[CardName] AS 'NAME OF THE PARTY', T1.[ItemCode] AS 'PART NO', T1.[Dscription] AS 'PART DESCRIPTION', T1.[Quantity], T1.[Price], T1.[LineTotal] AS 'BASE AMOUNT',

T1.[LineTotal]+t1.[VatSum] as'TOTAL', T0.[DocStatus], T0.[UserSign] ,T6.[U_NAME]

FROM OPDN T0 INNER JOIN PDN1 T1 ON T0.DocEntry = T1.DocEntry

INNER JOIN OITM T4 ON T1. ItemCode = T4. ItemCode

INNER JOIN OITB T5 ON T4.ItmsGrpCod = T5.ItmsGrpCod

INNER JOIN OCRD T3 ON T3.CardCode=T0.CardCode

INNER JOIN OUSR T6 ON T6.USER_CODE=T0.UserSign

WHERE T0.[DocDate] >=[%0] AND T0.[DocDate] <=[%1] AND t4.ItmsGrpCod <>'111' AND (T5.[ItmsGrpNam]='[%3]' OR '[%3]'=' ') AND (T3.[CardName]='[%4]' OR '[%4]'=' ' ) AND T1.[BaseType]<>'21' AND (T0.[DocStatus]='[%5]' OR '[%5]'=' ' )

ORDER BY T0.[DocDate], T0.[DocNum]