29/01/2013, 16:41
|
| Colaborador | | Fecha de Ingreso: agosto-2006 Ubicación: En la hermosa perla de occidente
Mensajes: 7.412
Antigüedad: 18 años, 3 meses Puntos: 774 | |
Respuesta: Manejo de UNION select co.co_num
, co.order_date
, ci.item
, i.description
, ci.qty_ordered
, ci.qty_shipped
, ci.price
, co.cust_po
, ih.inv_num
from smlp_app.dbo.co inner join smlp_app.dbo.coitem ci
on ci.co_num = co.co_num
inner join smlp_app.dbo.item i on i.item = ci.item
inner join smlp_app.dbo.inv_hdr ih on ih.co_num = co.co_num
inner join smlp_app.dbo.matltran mat on co.cust_po = mat.ref_num
union all
select po.po_num
, po.order_date
, pt.item
, pt.description
, pt.qty_ordered
, pt.qty_received
, pt.qty_voucher
, pt.item_cost
, pt.po_line
from syou_app.dbo.po inner join syou_app.dbo.poitem pt
on pt.po_num = po.po_num
prueba con algo asi :)
__________________ What does an execution plan say to t-sql query? Go f**k yourself, if you are not happy with me |