Ver Mensaje Individual
  #12 (permalink)  
Antiguo 17/08/2010, 09:09
Avatar de flaviovich
flaviovich
 
Fecha de Ingreso: agosto-2005
Ubicación: Lima, Peru
Mensajes: 2.951
Antigüedad: 18 años, 8 meses
Puntos: 39
Respuesta: Hacer una consulta

Una ayudita:
Código Javascript:
Ver original
  1. var sql = "SELECT TOP 1 stdUsuarios.nombre,stdUsuarios.apellidos"
  2. + " FROM stdUsuarios_stdRoles INNER JOIN stdUsuarios ON stdUsuarios_usuario = stdUsuarios.id"
  3. + " INNER JOIN stdAnotacionesCalendario ON stdUsuarios.id = stdUsuarios_id"
  4. + " WHERE stdRoles_rol = '" + id_rol + "' AND (excepcion = 0 OR horas != 0)"
  5. + " AND DATEPART(dd, fecha)=" + date.getDate()
  6. + " AND DATEPART(mm, fecha)=" + (date.getMonth() + 1)
  7. + " AND DATEPART(yy, fecha)=" + date.getFullYear()
  8. + " AND apellidos+nombre > '" + ape_guardia+nom_guardia + "'"
  9. + " order by apellidos, nombre";
__________________
No repitamos temas, usemos el Motor de busquedas
Plantea bien tu problema: Ayúdanos a ayudarte.