on 11-10-2011 6:56 PM
Expertos tengo una consulta y agradeceria bastante su ayuda, la consulta es, tengo una listado de facturas de ventas por serie pero solo quiero ver la ultima factura ej:
Serie Factura Numero factura
A 1
A 2
necesito que solo me muestre la factura Numero 2 hay alguna forma de hacer esto por medio de un query yo realice un query que me muestra todas las facturas de una serie en especifico pero me gustaria ver solo la ultima factura, dejo el query que utilizo para ver todas las facturas.
SELECT T0.[U_FacNum]
FROM OINV T0
WHERE T0.[U_FacSerie] = 'A'
GROUP BY T0.[U_FacSerie], T0.[U_FacNum]
Espero me puedan ayudar y de antemano muy agradecido.
Prueba asi y comentas por favor:
SELECT MAX(T0.[U_FacNum] )
FROM OINV T0
WHERE T0.[U_FacSerie] = 'A'
GROUP BY T0.[U_FacSerie], T0.[U_FacNum]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Gracias jovenes ya halle la sulucion es utilizando la funcion MAX.
Siempre gracias por la ayuda, y atencion.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
10 | |
6 | |
5 | |
5 | |
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.