concatenación en el where ¡URGENTE!
Publicado por Marta (30 intervenciones) el 20/06/2007 10:54:15
Buenos días,
Tengo que hacer una select de este tipo pasándole unas condiciones para el where:
condicion varchar2(100);
condicion := ' and (H.puerto='BCN' and H.anyofichero= '2006'
and H.mesfichero >= 1 and estadoproceso=13)' ;
select F.FECHAEMBARQUE, H.MESFICHERO INTO FECHA, MES
from FICHERO_PUERTOS F, HISTORIAL_PUERTOS H
where f.id_fichero_historial= h.id_historial_puertos || condicion
¿por qué no me funciona? ¿como se pueden concetaner condiciones en el where?
Muchas gracias y saludos.
Tengo que hacer una select de este tipo pasándole unas condiciones para el where:
condicion varchar2(100);
condicion := ' and (H.puerto='BCN' and H.anyofichero= '2006'
and H.mesfichero >= 1 and estadoproceso=13)' ;
select F.FECHAEMBARQUE, H.MESFICHERO INTO FECHA, MES
from FICHERO_PUERTOS F, HISTORIAL_PUERTOS H
where f.id_fichero_historial= h.id_historial_puertos || condicion
¿por qué no me funciona? ¿como se pueden concetaner condiciones en el where?
Muchas gracias y saludos.
Valora esta pregunta


0