Good day,
I am having trouble with the computation in SQL.
i want to subtract the intStock and the intTotal_OutBound_items to just to get the items available.
here is my SP..
INSERT INTO CO09_Report
(
intMaterial
,txtDescription
,txtMaterial_Type
,txtATP_check
,intDelivering_Plant
,intOrder_Quantity
,isHeld_by_Finance
,isRejected_OOS
,isRejected_Others
,intOpen_Order_Quantity
,intOrder_Quantity_NKA
,intOrder_Quantity_RKA
,intOrder_Quantity_Others
,intStock
,intDSD_Delivery
,intOUtBound_Haulage
,intTotal_OutBound_items
,intInBound_Haulage
,intHaulage_In_Transit
,intProcess_Order
,intTotal_Inbound_Items
,(intStock)
)
SELECT NODE.value('@Material','[BigInt]')
,NODE.value('@Description','[nvarchar](50)')
,NODE.value('@Material_Type','[nchar](10)')
,NODE.value('@ATP_check','[nchar](10)')
,NODE.value('@Delivering_Plant','[nchar](10)')
,NODE.value('@Order_Quantity','[int]')
,NODE.value('@Held_by_Finance','[bit]')
,NODE.value('@Rejected_OOS','[bit]')
,NODE.value('@Rejected_Others','[bit]')
,NODE.value('@Open_Order_Quantity','[int]')
,NODE.value('@Order_Quantity_NKA','[int]')
,NODE.value('@Order_Quantity_RKA','[int]')
,NODE.value('@Order_Quantity_Others','[int]')
,NODE.value('@Stock','[int]')
,NODE.value('@DSD_Delivery','[int]')
,NODE.value('@OutBound_Haulage','[int]')
,NODE.value('@Total_OutBound_items','[int]')
,NODE.value('@InBound_Haulage','[int]')
,NODE.value('@Haulage_In_Transit','[int]')
,NODE.value('@Process_Order','[int]')
,NODE.value('@Total_Inbound_Items','[int]')
,NODE.value('@intCustom_ATP_Quantity','[int]')
FROM @xmlC009Report.nodes('dsExcelC009ReportRecords/dtExcelC009ReportRecords') TEMPXML(NODE)
i need help, can someone help me with this prob..
thanks