Quantcast
Channel: SQL General — mibuso.com
Viewing all articles
Browse latest Browse all 116

Update Posted Sales Transaction Fact Table

$
0
0
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


Viewing all articles
Browse latest Browse all 116

Trending Articles