Ver Mensaje Individual
  #3 (permalink)  
Antiguo 10/12/2009, 21:20
jesolorzano
 
Fecha de Ingreso: junio-2007
Ubicación: El Salvador
Mensajes: 21
Antigüedad: 17 años, 9 meses
Puntos: 0
Respuesta: Error 'Conversion failed when converting datetime' dentro de SP

las variables @lfecha_inicial y @lfecha_final son de tipo datetime. he probado los siguientes cambios sin resultado:

Código SQL:
Ver original
  1. -- otra prueba
  2. b.docduedate>=CONVERT(datetime,' +   @lfecha_inicial +   ',101) AND b.docduedate<=CONVERT(datetime,' +   @lfecha_final +   ',101)
  3.  
  4.  
  5. -- otra prueba
  6. CONVERT(datetime,b.docduedate,101)>=CONVERT(datetime,' +   @lfecha_inicial +   ',101) AND CONVERT(datetime,b.docduedate,101)<=CONVERT(datetime,' +   @lfecha_final +   ',101)