Ver Mensaje Individual
  #1 (permalink)  
Antiguo 07/10/2007, 01:03
natsumy
 
Fecha de Ingreso: marzo-2007
Mensajes: 76
Antigüedad: 17 años, 2 meses
Puntos: 0
Query Que Me Devuelva La Ultima Fecha

HOLA, NECESITO HACER UNA CONSULTA EN UNA TABLA EN DONDE SE GUARDAN TODOS LOS REGISTROS DE LOS ARTICULOS, BASICAMENTE LA INFORMACION QUE NECESITO ES ULTIMA EXISTENCIA DE LOS ARTICULOS DE UN DIA DETERMINADO POR ENDE SOLO NECESITO QUE ME DEVUELVA UN REGISTRO POR CADA ARTICULO
yo intente con el siguiente sql pero me devuelbe todos los registros

SELECT MAX(BITACORAArticulos.Fecha), CodArticulo, Existencia, CodBodega
FROM BITACORAArticulos
WHERE (dbo.FormatoFecha(BITACORAArticulos.Fecha, '%Y%m%d')= '20070201')
GROUP BY BITACORAArticulos.Fecha, CodArticulo, Existencia, CodBodega
ORDER BY CodArticulo

si alguien sabe cual es la correccion que debo hacer le agrezco toda informacion.