on 10-03-2011 10:54 PM
Jovenes expertos me solicitan visualizar los datos de ventas y de compras en base un campo de usuario, yo realice el siguiente query pero no funciona, pero si enves de [%0] coloco 0060208 que es un codigo si funciona, pero necesito seleccionar el codigo y dejarlo fijo.
SELECT T1.[ItemCode], T1.[Dscription], T1.[Quantity], T1.[LineTotal], T0.[U_Descripcion]
FROM OINV T0 INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry
WHERE T0.[U_datos] =[%0]
union all
SELECT T1.[ItemCode], T1.[Dscription], T1.[Quantity], T1.[LineTotal], T0.[U_Descripcion]
FROM OPCH T0 INNER JOIN PCH1 T1 ON T0.DocEntry = T1.DocEntry
WHERE T0.[U_datos] =[%0]
Espero haberme dado a entender.
Y de antemano muy agradecido por la ayuda.
intenta con
SELECT T1.[ItemCode], T1.[Dscription], T1.[Quantity], T1.[LineTotal], T0.[U_Descripcion]
FROM OINV T0 INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry
WHERE T0.[U_datos] ='[%0]'
union all
SELECT T1.[ItemCode], T1.[Dscription], T1.[Quantity], T1.[LineTotal], T0.[U_Descripcion]
FROM OPCH T0 INNER JOIN PCH1 T1 ON T0.DocEntry = T1.DocEntry
WHERE T0.[U_datos] ='[%0]'
te marca algun error?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Gracias Mauricio me da el siguiente error, te dejo un imagen del mismo.
http://s2.subirimagenes.com/otros/previo/thump_6990626error.jpg
Gracias de antemano.
User | Count |
---|---|
89 | |
7 | |
7 | |
4 | |
4 | |
3 | |
3 | |
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.