Ver Mensaje Individual
  #8 (permalink)  
Antiguo 23/02/2010, 02:50
hpepe
 
Fecha de Ingreso: febrero-2010
Mensajes: 15
Antigüedad: 14 años, 2 meses
Puntos: 0
Respuesta: Obtener media de fechas

Se me ha ocurrido usar la función MAX para que almacene los registros más nuevos pero existe algún conflicto en la función.

Cita:
mySQLac9== "SELECT AVG(DAY(DATE() - DAY(DATE_MESS))) FROM MESSAGES WHERE ID_REVERSE IN (SELECT ID_PART, Max(DATE_MESS), Max(TIME_MESS) FROM REVERSE where HOLD_STATUS='Ajustado')"

Cita:
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] You have written a subquery that can return more than one field without using the EXISTS reserved word in the main query's FROM clause. Revise the SELECT statement of the subquery to request only one field.