Ver Mensaje Individual
  #5  
Antiguo 13-07-2012
Avatar de jafera
jafera jafera is offline
Miembro
 
Registrado: may 2007
Ubicación: Llagostera (Girona)
Posts: 582
Reputación: 17
jafera Va por buen camino
Hola de nuevo.

Realmente lo que necesito es unir las consultas siguientes en una de sola y pudiendo cambiar el where id_arbit1 por id_arbit2, id_arbit3, etc... hasta el id_arbit8 por el valor del arbitro seleccionado.(parametro)

Código SQL [-]
 
select id_arbit1, id_rebut, import_1, sobres_1, import_km_1, campionat1, feiner1, dos_sectors1, total_a1 from re0010dg
where id_arbit1 = 1

select id_arbit2, id_rebut, import_2, sobres_2, import_km_2, campionat2, feiner2, dos_sectors2, total_a2 from re0010dg
where id_arbit2 = 1

select id_arbit3, id_rebut, import_3, sobres_3, import_km_3, campionat3, feiner3, dos_sectors3, total_a3 from re0010dg
where id_arbit3 = 1

select id_arbit4, id_rebut, import_4, sobres_4, import_km_4, campionat4, feiner4, dos_sectors4, total_a4 from re0010dg
where id_arbit4 = 1

select id_arbit5, id_rebut, import_5, sobres_5, import_km_5, campionat5, feiner5, dos_sectors5, total_a5 from re0010dg
where id_arbit5 = 1

select id_arbit6, id_rebut, import_6, sobres_6, import_km_6, campionat6, feiner6, dos_sectors6, total_a6 from re0010dg
where id_arbit6 = 1

select id_arbit7, id_rebut, import_7, sobres_7, import_km_7, campionat7, feiner7, dos_sectors7, total_a7 from re0010dg
where id_arbit7 = 1

select id_arbit8, id_rebut, import_8, sobres_8, import_km_8, campionat8, feiner8, dos_sectors8, total_a8 from re0010dg
where id_arbit8 = 1

Cada consulta por separado funciona perfectamente

Saludos

Josep
Responder Con Cita