Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all. I'm not sure whether this is just my incorrect coding but I taken field A to create field B with line mid(A,3,2) as B. I am trying to further refine this with Keepchar(B,'1234567890') as C however it does not seem to like this due to the fact that B is a created field. Does anyone have any ideas as to how else I could go about this?
Thanks Oli.
How about
A,
mid(A,3,2) as B,
Keepchar(mid(A,3,2),'1234567890') as C
?
Regards,
Kristofer
hi,
i think you can do it by resident load
Table1:
Load
A,
mid(A,3,2) as B
from .....;
Table2:
Load
A,
B,
Keepchar(B,'1234567890') as C resident Table1;
Drop Table Table1;
Oliver,
To understand the issue better, it would be helpful to see your script code.
Are you trying to calculate C from B in the same load statement? i.e.
load (A,3,2) as B,
Keepchar(B,'1234567890') as C,
_otherfields_
from source;
If you are, then try a nested load instead:
load B,
Keepchar(B,'1234567890') as C,
_otherfields_;
load (A,3,2) as B,
_otherfields_
from source;
Hi,
Try like this
LOAD
A,
mid(A,3,2) as B,
Keepchar(mid(A,3,2),'1234567890') as C
FROM DataSource;
OR try like this using preceding load
LOAD
*,
Keepchar(mid(A,3,2),'1234567890') as C;
LOAD
A,
mid(A,3,2) as B
FROM DataSource;
Hope this helps you.
Regards,
jagan.