Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a table named ticpr200 and I want to load 3 same dimensions from the same table with different conditions as follows-
1) Material Cost (ticpr200.amnt) - condition to pick this field - ticpr200.cpcc=100 and ticpr200.cpcp=100
2) Operation cost (ticpr200.amnt) - condition to pick this field - ticpr200.cpcc=100 and ticpr200.cpcp=200
3) Inventory Type (ticpr200.amnt) - condition to pick this field - ticpr200.cpcc=100 and ticpr200.cpcp=300
I need to load this in the data load editor.
Like this are you looking for?
ticpr200:
load *
,if(ticpr200.cpcc = 100 and ticpr200.cpcp = 100, ticpr200.amt) as [Material Cost]
,if(ticpr200.cpcc = 100 and ticpr200.cpcp = 200, ticpr200.amt) as [Operation Cost]
,if(ticpr200.cpcc = 100 and ticpr200.cpcp = 300, ticpr200.amt) as [Inventory Type]
;
//dummydataa
load * inline
[ticpr200.cpcc, ticpr200.amt, field2, fieldn
1, 100, a, x
2, 200, b, y
3, 300, c, z
]
;
Like this are you looking for?
ticpr200:
load *
,if(ticpr200.cpcc = 100 and ticpr200.cpcp = 100, ticpr200.amt) as [Material Cost]
,if(ticpr200.cpcc = 100 and ticpr200.cpcp = 200, ticpr200.amt) as [Operation Cost]
,if(ticpr200.cpcc = 100 and ticpr200.cpcp = 300, ticpr200.amt) as [Inventory Type]
;
//dummydataa
load * inline
[ticpr200.cpcc, ticpr200.amt, field2, fieldn
1, 100, a, x
2, 200, b, y
3, 300, c, z
]
;