on 07-13-2010 12:11 AM
Hola a todos
hay forma de generar un solo informe donde muestre tanto ordenes de fabricacion como de recibo de fabricacionhe intentado pero los dos estan en tablas diferentes y no permite un Join
funciono
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hola.
¿Necesita relacionar los recibos de producción de cada Orden de Fabricación?.
Intenta con este código:
SELECT T2.[DocNum] as 'N° OF', T2.[PostDate] as 'Fecha OF', T2.[ItemCode], T2.[PlannedQty] as Planeada,
T2.[CmpltQty] as Completada, T0.[DocNum] as 'N° Recibo',
T0.[DocDate] as 'Fecha Recibo', 'Dif.Días'=(DATEDIFF(dd,T2.[PostDate],T0.DocDate)), T1.[ItemCode],
T1.[Dscription], T1.[Quantity], T3.[ItmsGrpCod], T4.[ItmsGrpNam], T0.[Comments]
FROM OIGN T0
INNER JOIN IGN1 T1 ON T0.DocEntry = T1.DocEntry
LEFT JOIN OWOR T2 ON T2.DocNum = T1.BaseRef
INNER JOIN OITM T3 ON T1.ItemCode = T3.ItemCode
INNER JOIN OITB T4 ON T3.ItmsGrpCod = T4.ItmsGrpCod
WHERE T0.[DocDate] >= '[%0]' AND T0.[DocDate] <= '[%1]' AND T0.[JrnlMemo] = 'Recibo de producción'
ORDER BY T2.[DocNum]
Saludos.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
102 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.