Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have a simple application that reads a texfile with data like this
1000;10;20101101
1000;15;20101101
1000;100;20101101
1000;90;20101101
1000;11;20101101
1001;15;20101101
1001;100;20101101
1001;45;20101101
1001;555;20101101
1001;75;20101101
1002;15;20101101
1002;100;20101101
1002;45;20101101
1002;555;20101101
1002;75;20101101
1000;10;20101102
1000;15;20101102
1000;100;20101102
1000;90;20101102
1000;11;20101102
1001;15;20101102
1001;100;20101102
1001;45;20101102
1001;555;20101102
1001;75;20101102
1002;15;20101102
1002;100;20101102
1002;45;20101102
1002;555;20101102
1002;75;20101102
....
....
it contains customer number,amount ad delivery date.
How shall I manage to add one fixed freight cost for each day pro customer. Can I add it to the table created
at the load or do I have to load it into an own table. the freight cost is in a constant SET Freight=20.00
The load looks like this:
Directory;
PA:
LOAD
@1 as kdnr,
@2 as elonr,
@3
,
@4
,
@5
,
@6
,
@7
,
@8
,
@9
as dat,
left
(@9,4)& '-' & mid(@9,5,2) & '-' & right(@9,2) as TempDate
FROM
..
\All.txt
(txt, codepage is 1252, no labels, delimiter is ';', msq)
where left(@1,4)='SE00';
kindly
Håkan
Hello Hakan,
I am Glad to help. Don't hesitate to post again. Would you mark the aswer as solution so this thread will be flagged green and can be recognized as finished.
RR
Hello Hakan,
look at my little application. The inline load statement is only to get your example data. The key is the load-statement on the second tab. If the source is always sorted by date and cust-number the script will work fine. If it is not always sorted you can read the unsorted data and sort it and then add the field Freight while reading from the (sorted) resident table.
Regards, Roland
Thanks for a prompt answer. It really solved my problem and I´m a bit wiser now.
Thanks for all help.
kindly
Håkan
Hello Hakan,
I am Glad to help. Don't hesitate to post again. Would you mark the aswer as solution so this thread will be flagged green and can be recognized as finished.
RR