Al momento de generar una UNION, me muetra el sigueinte error:
Error converting data type nvarchar to numeric.
Esta es la UNION que quiero realizar:
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.description
, pt.po_line
, pt.qty_ordered
, pt.qty_received
, pt.qty_voucher
, pt.item_cost
, pt.item
from syou_app.dbo.po inner join syou_app.dbo.poitem pt
on pt.po_num = po.po_num
Ojala y me puedan ayudar.