insert into ps_cm_perpadj_tmp (business_unit , inv_item_id , cm_dt_timestamp_p , cm_seq_nbr_p , cm_unit_cost_old , cm_unit_cost_povo , CM_UNIT_COST_VO , QTY_BASE , QTY_OWNED , CM_ADJUST_QTY , CM_WRITEOFF_QTY , CM_UNIT_COST , CURRENCY_CD) SELECT A.BUSINESS_UNIT , A.INV_ITEM_ID , A.CM_DT_TIMESTAMP_P , A.CM_SEQ_NBR_P , C.CM_UNIT_COST , A.CM_UNIT_COST_POVO , A.CM_UNIT_COST_VO , A.QTY_BASE , B.QTY_OWNED , 0 , 0 , 0 , D.BASE_CURRENCY FROM PS_CM_PERPAVGS_VW A , PS_BU_ITEMS_INV B , PS_CM_PERPCUR_VW C , PS_BUS_UNIT_TBL_IN D WHERE A.BUSINESS_UNIT = B.BUSINESS_UNIT AND A.INV_ITEM_ID = B.INV_ITEM_ID AND A.BUSINESS_UNIT = C.BUSINESS_UNIT AND A.INV_ITEM_ID = C.INV_ITEM_ID AND A.BUSINESS_UNIT = D.BUSINESS_UNIT AND A.BUSINESS_UNIT = :1
As can be seen by your INSERT statement, there is no division. So there are now two places to look. First, your...
By submitting your email address, you agree to receive emails regarding relevant topic offers from TechTarget and its partners. You can withdraw your consent at any time. Contact TechTarget at 275 Grove Street, Newton, MA.
INSERT statement is performing a SELECT statement. This SELECT statement has three components to the FROM clause. If one of those components is a view, it is possible that the view is performing an illegal division operation, hence the error. Or the view could be calling a function which is performing the division. Second, your table could have a trigger on it which is performing division. Check any views or triggers involved in the operation.
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.