Buenas, necesito ver si alguien me puede ayudar, tengo estas 3 consultas...
Consulta A
SELECT tasacion.vt_nom_sol AS Titular, tasacion.vt_cif_sol AS CIF, tasacion.vt_num_tas, Format(tasacion.vt_fch_rev,"dd/mm/yy") AS Fecha_entrega, tasacion.vt_imp_tas AS Valor_tasacion, tasacion.vt_tar_tas AS Factura_tasacion, tasacion.vt_tar_tas*0.2 AS cesion_BBVA
FROM clitasa INNER JOIN tasacion ON clitasa.cl_cod_cl=tasacion.vt_cod_cli
WHERE ((tasacion.vt_cod_cli)=clitasa.cl_cod_cl) And ((clitasa.cl_ban_sic)="0182");
Consulta B
SELECT tasacion.vt_nom_sol AS Titular, tasacion.vt_cif_sol AS CIF, tasacion.vt_num_tas, clitasa.cl_suc_sic AS Sucursal, Format(tasacion.vt_fch_rev,"dd/mm/yy") AS Fecha_entrega, tasacion.vt_tar_tas AS Factura_tasacion, tasacion.vt_tar_tas*0.2 AS cesion_BBVA
FROM clitasa INNER JOIN tasacion ON clitasa.cl_cod_cl = tasacion.vt_cod_cli
WHERE ((tasacion.vt_cod_cli)=[clitasa].[cl_cod_cl]) AND ((clitasa.cl_ban_sic)="0182") OR (((clitasa.cl_ban_sic) ="9500") AND (clitasa.cl_suc_sic) IN("0182","2337","2372","4370","5404","5405","5409 ","5415","5417","5424","5433","5442","5895"));
Consulta C
SELECT tasacion.vt_nom_sol AS Titular, tasacion.vt_cif_sol AS CIF, tasacion.vt_num_tas, clitasa.cl_suc_sic AS Sucursal, Format(tasacion.vt_fch_rev,"dd/mm/yy") AS Fecha_entrega, tasacion.vt_tar_tas AS Factura_tasacion, tasacion.vt_tar_tas*0.2 AS cesion_BBVA
FROM clitasa INNER JOIN tasacion ON clitasa.cl_cod_cl = tasacion.vt_cod_cli
WHERE ((tasacion.vt_cod_cli)=clitasa.cl_cod_cl) And (((clitasa.cl_ban_sic) ="9500") AND (clitasa.cl_suc_sic) IN("0182","0999","6035","2342","2344","2376","5423 ","5429","2338","2347","2373","4373","5406","5410" ,"5411","5412","5413","5422","5425","5426","5427", "5431","5439","6485"));
Necesito hacer una consulta que me pida fecha inicio y fecha fin y entonces me de los datos de la primera consulta si la primera consulta no tiene datos entonces que me de lo de las dos consultas siguientes...
Alguien puede ayudarme???
gracias