Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Created fields

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.

Labels (1)
4 Replies
kristoferahlin
Partner - Contributor III
Partner - Contributor III

How about

A,

mid(A,3,2) as B,

Keepchar(mid(A,3,2),'1234567890') as C

?

Regards,

Kristofer

sasikanth
Master
Master

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;

northerner
Partner - Contributor III
Partner - Contributor III

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;

jagan
Partner - Champion III
Partner - Champion III

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.