Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
adiey_26
Contributor
Contributor

.

 
Labels (1)
5 Replies
Or
MVP
MVP

I'm confused - you want to achieve something but you don't want to use the specific function that achieves that something? Could you perhaps clarify what the end goal and why keepchar() isn't the right solution? That might allow a solution to be tailored to your specific needs.

adiey_26
Contributor
Contributor
Author

This is an Assignment and my mentor wants me to use loops so keepchar is
not relevant in this case.
Thanks.
Kashyap_R
Partner - Specialist
Partner - Specialist

Hi 

Use this

PurgeChar(LOWER(amdnam),'abcdefghijklmnopqrstuvwxyz')

Thanks and Regards 

Kashyap.R

Thanks and Regards
Kashyap.R
marcus_sommer

If it should be loop-approach it meant that this task is aimed as programmer-lesson and not to solve a real case.

Nevertheless you starting with something like this:

load *, here could you place any checking logic;
load mid(Field, iterno(), 1) as Char
resident Source while iterno() <= len(Field);

- Marcus

vwkjbkavb2
Contributor
Contributor

If your mentor gave you this assignment it means there is a lesson in it for you, you should focus on solving it yourself rather than asking for the answer on community. Anyways, below is a script I wrote which could be a possible solution. 

 

table:
load * inline [
accountid
bcejhbq6vv726
kbceb82873bacnkbch
bjkdvkbkb9812891
ajbcui2222BKBBAKB
];
let vx = peek('accountid',$(i),'table');
let vn = NoOfRows('table');
for i=0 to $(vn)-1
for j=1 to len(peek('accountid',$(i),'table'))
let vy = mid(peek('accountid',$(i),'table'),$(j),1);
if(isnum(mid(peek('accountid',$(i),'table'),$(j),1))=0) then
t$(i):
load mid(peek('accountid',$(i),'table'),$(j),1) as accountid$(i)
autogenerate 1;
ENDIF
next j
tfinal:
load concat(accountid$(i),'',recno()) as account_id
resident t$(i);
drop table t$(i);
next i
drop table table;