1,105,594 Community Members

dbase subtraction

Member Avatar
cyberdaemon
Junior Poster
125 posts since Nov 2010
Reputation Points: 1 [?]
Q&As Helped to Solve: 3 [?]
Skill Endorsements: 0 [?]
 
0
 

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

Question Self-Answered as of 1 Year Ago
Member Avatar
cyberdaemon
Junior Poster
125 posts since Nov 2010
Reputation Points: 1 [?]
Q&As Helped to Solve: 3 [?]
Skill Endorsements: 0 [?]
 
0
 

i already sove the issue.. thanks coders

Member Avatar
pritaeas
mod_pritaeas
11,319 posts since Jul 2006
Reputation Points: 1,420 [?]
Q&As Helped to Solve: 1,835 [?]
Skill Endorsements: 156 [?]
Moderator
Featured
Sponsor
 
0
 

Care to share your solution?

You
This question has already been solved: Start a new discussion instead
Post:
Start New Discussion
View similar articles that have also been tagged: