Ver Mensaje Individual
  #1 (permalink)  
Antiguo 20/05/2014, 23:23
chelitox
 
Fecha de Ingreso: junio-2009
Mensajes: 145
Antigüedad: 14 años, 10 meses
Puntos: 0
Comprobar si existe un registro

Hola amigo tengo la siguiente situacion

desde un sp

estoy haciendo la siguiente consulta

select id into _id_reporte from vreportesactividades where id_usuario = 1 and fecha_ft = '2014-05-20' LIMIT 1;

lo que quiero es comprobar si se encontro un id, porque en el caso de no haber un registro me manda un campo vacio y he querido hacerlo con un if

if _id_reporte = null then

pero no funciona me pasa de alto el if cuando no hay algun registro

espero me puedan ayudar

gracias