19/02/2010, 14:42
|
| | Fecha de Ingreso: febrero-2010
Mensajes: 31
Antigüedad: 14 años, 8 meses Puntos: 0 | |
Respuesta: Consultas SELECT Miira estas son las consultas que hiice y pos kiiero uniirlas...
select Llenos.gran as ID,Granja.nom_gran as NOMBRE,Llenos.num_plan as PLANILLA, Lote.id_lot as LOTE,Llenos.cil_ent as 'TOTAL CILINDROS',
(select sum(pes_cil)from Llenos) as 'PESO B.RETIRO',(select sum(pes_cil)from Llenos) as 'PESO NO COSUMIDO',Planilla.num_com_plan as 'O.COMPRA'
from Llenos,Planilla,Granja,Lote
where id_plan=num_plan and id_gran=gran;
select Entrega.gran as ID,Granja.nom_gran as NOMBRE,Entrega.num_plan as PLANILLA, Lote.id_lot as LOTE,Entrega.cil_ent as 'TOTAL CILINDROS',
(select sum(pes_cil)from Entrega) as 'PESO B.RETIRO',(select sum(pes_cil)from Entrega) as 'PESO NO COSUMIDO',Planilla.num_com_plan as 'O.COMPRA'
from Entrega,Planilla,Granja,Lote
where id_plan=num_plan and id_gran=gran;
select Vacios.gran as ID,Granja.nom_gran as NOMBRE,Vacios.num_plan as PLANILLA, Lote.id_lot as LOTE,Vacios.cil_vac as 'TOTAL CILINDROS',
(select sum(pes_cil)from Vacios) as 'PESO B.RETIRO',(select sum(pes_cil)from Vacios) as 'PESO NO COSUMIDO',Planilla.num_com_plan as 'O.COMPRA'
from Vacios,Planilla,Granja,Lote
where id_plan=num_plan and id_gran=gran; |