Fix Oracle Error:

mrp.docstatus,
ERROR at line 24:
ORA-12704: character set mismatch

Need to Cast strings in Union to nvarchar2 where needed

Link to SF Tracker: http://sourceforge.net/support/tracker.php?aid=2928680
This commit is contained in:
tspc 2010-01-11 21:48:45 +00:00
parent d0911da112
commit c95d84825c
2 changed files with 6 additions and 7 deletions

View File

@ -70,7 +70,7 @@ SYSDATE, --mrp.datestartschedule,
SYSDATE, --mrp.datefinishschedule,
SYSDATE, --mrp.datestart,
SYSDATE, --mrp.datesimulation,
'CO', --mrp.docstatus,
CAST('CO' AS nvarchar2(2)), --mrp.docstatus,
null, --mrp.m_forecast_id,
null, --mrp.m_forecastline_id,
null, --mrp.value,
@ -86,11 +86,11 @@ pp.safetystock - bomqtyonhand(pp.M_Product_ID,pp.M_Warehouse_ID, 0) AS qty, --mr
pp.s_resource_id,
null, --planner_id
null, --mrp.priority,
'STK', --mrp.ordertype,
CAST('STK' AS nvarchar2(3)), --mrp.ordertype,
'D' , --mrp.typemrp,
p.LowLevel,
null, --C_BPartner_ID
'Safety Strock' --documentNo(mrp.pp_mrp_id) AS documentNo
CAST('Safety Stock' AS nvarchar2(80)) --documentNo(mrp.pp_mrp_id) AS documentNo
FROM pp_product_planning pp
INNER JOIN M_Product p ON (pp.M_Product_ID = p.M_Product_ID)
WHERE bomqtyonhand(pp.M_Product_ID,pp.M_Warehouse_ID, 0) < pp.safetystock

View File

@ -1,5 +1,4 @@
SET SQLBLANKLINES ON
;
CREATE OR REPLACE VIEW rv_pp_mrp AS
SELECT
@ -72,7 +71,7 @@ SYSDATE, --mrp.datestartschedule,
SYSDATE, --mrp.datefinishschedule,
SYSDATE, --mrp.datestart,
SYSDATE, --mrp.datesimulation,
'CO', --mrp.docstatus,
CAST('CO' AS nvarchar2(2)), --mrp.docstatus,
null, --mrp.m_forecast_id,
null, --mrp.m_forecastline_id,
null, --mrp.value,
@ -88,11 +87,11 @@ pp.safetystock - bomqtyonhand(pp.M_Product_ID,pp.M_Warehouse_ID, 0) AS qty, --mr
pp.s_resource_id,
null, --planner_id
null, --mrp.priority,
'STK', --mrp.ordertype,
CAST('STK' AS nvarchar2(3)), --mrp.ordertype,
'D' , --mrp.typemrp,
p.LowLevel,
null, --C_BPartner_ID
'Safety Stock' --documentNo(mrp.pp_mrp_id) AS documentNo
CAST('Safety Stock' AS nvarchar2(80)) --documentNo(mrp.pp_mrp_id) AS documentNo
FROM pp_product_planning pp
INNER JOIN M_Product p ON (pp.M_Product_ID = p.M_Product_ID)
WHERE bomqtyonhand(pp.M_Product_ID,pp.M_Warehouse_ID, 0) < pp.safetystock