Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have data from three different areas that have exactly the same structure. When I load the data from these files, I want to have a field that says "Area" and populate it with the area to which the file corresponds. Is there a way to do this within the load script?
For example:
South (File 1):
Date Sales
01/06/2018 $20
01/18/2018 $30
------------------------------------
North (File 2):
Date Sales
01/16/2018 $60
01/22/2018 $90
------------------------------------
Loaded Fields
Date Sales Area
01/06/2018 $20 South
01/18/2018 $30 South
01/16/2018 $60 North
01/22/2018 $90 North
load
date,
sales,
'south' as area
from file1
load
date,
sales,
'North' as area
from file2
load
date,
sales,
'south' as area
from file1
load
date,
sales,
'North' as area
from file2
May be create Flag like
South:
Load *,'South' as Area Inline [
Date ,Sales
01/06/2018 ,$20
01/18/2018 ,$30
];
North:
Load *,'North' as Area Inline [
Date ,Sales
01/16/2018, $60
01/22/2018, $90
];
Thanks. This worked.