Options

Update Posted Sales Transaction Fact Table

jasonkwpjasonkwp Member Posts: 12
I cannot use ISNULL , If you look at my screenshot I am trying to update the actual sales cost , sales support and sales cost , all these dimensions related to the sales amount(actual) , cost amount (actual) in the Value entry table

my script to update the fields marked in orange on my screenshot is

UPDATE [dbo].[Posted Sales Transactions_R]
SET [Cost Amount] = ([Cost Amount] + [Sales Costs (Actual)])
WHERE [Item Charge No.] = 'FOBB'

UPDATE [dbo].[Posted Sales Transactions_R]
SET [Sales Costs (Actual)] = ''
WHERE [Item Charge No.] = 'FOBB'

UPDATE [dbo].[Posted Sales Transactions_R]
SET [Sales Costs FCY] = 0
WHERE [Item Charge No.] = 'FOBB'

But the script is still not adding the sales cost amount into that fields. the sales cost amount is -198,132.61 , this amount should be in the Sales Cost , Sales Support and Actual Sales Cost fields. in short , FOBB is calculated as our Freight Charges

My posted sales transactions table is a fact table within my cube

Best Answers

Answers

  • Options
    jasonkwpjasonkwp Member Posts: 12
    my screenshot Indicates that i am trying to update the actual sales cost , sales support and sales cost , all these dimensions related to the sales amount(actual) , cost amount (actual) in the Value entry table

    my script to update the fields marked in orange on my screenshot is

    UPDATE [dbo].[Posted Sales Transactions_R]
    SET [Cost Amount] = ([Cost Amount] + [Sales Costs (Actual)])
    WHERE [Item Charge No.] = 'FOBB'

    UPDATE [dbo].[Posted Sales Transactions_R]
    SET [Sales Costs (Actual)] = ''
    WHERE [Item Charge No.] = 'FOBB'

    UPDATE [dbo].[Posted Sales Transactions_R]
    SET [Sales Costs FCY] = 0
    WHERE [Item Charge No.] = 'FOBB'

    But the script is still not adding the sales cost amount into that fields. the sales cost amount is -198,132.61 , this amount should be in the Sales Cost , Sales Support and Actual Sales Cost fields. in short , FOBB is calculated as our Freight Charges

    My posted sales transactions table is a fact table within my cube

Sign In or Register to comment.