Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
newbie question here I'm sure:
I need to clean up a text string that is retrieved as a field from a SQL Select statement so that I can join it to another field loaded from a Table file. I am trying to avoid having to do multiple replace() functions in my select statement and was hoping to rely on the allow() function in QlikView. So, is it possible to update the value of a field that is loaded via SQL select and if so how.
Ideally I'd be able to do something like:
ODBC CONNECT TO SOME_DB;
LET DNIS = string.allow(SOME_DB.DNIS,'0123456789');
SQL SELECT ..., phone_home as DNIS... FROM SOME_DB.leads where deleted <> 1;
so that the field DNIS now only includes numeric characters.
I would suggest you make this kind of cleaning a preceeding load:
ODBC CONNECT TO SOME_DB;
Load keepchar(DNIS, '0123456789') as DNIS;
SQL SELECT ..., phone_home as DNIS... FROM SOME_DB.leads where deleted <> 1;
- Marcus
I would suggest you make this kind of cleaning a preceeding load:
ODBC CONNECT TO SOME_DB;
Load keepchar(DNIS, '0123456789') as DNIS;
SQL SELECT ..., phone_home as DNIS... FROM SOME_DB.leads where deleted <> 1;
- Marcus
Marcus,
thank you. That worked exactly as expected.
Regards,
Paul
@Paul; You should mark Marcus succession as answer.
@Marcus; that was helpful suggestion
Thank you.