Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Community good morning,
In my QlikView document, I read some task records, like this:
Task |
---|
71-05-21 |
23-67-92 |
01-83-84 (Not found) |
21-04-57 |
43-10-21 (Agreed) |
I would like to remove all the part that comes after the "(" in all registers, but keeping the task number...
Is this possible in a "WHERE" clause?
I tried to make something like: = if ( wildmatch ( [Task] , '*(*' ) = 1, Replace ( [Task], '(*)' , '' ), [Task] ) as New_Field
but without sucess.
Best regards.
Try this
Table:
LOAD *,
Trim(Left(Task, Index(Task & '(', '(')-1)) as TaskNum;
LOAD * INLINE [
Task
71-05-21
23-67-92
01-83-84 (Not found)
21-04-57
43-10-21 (Agreed)
];
Try this
Table:
LOAD *,
Trim(Left(Task, Index(Task & '(', '(')-1)) as TaskNum;
LOAD * INLINE [
Task
71-05-21
23-67-92
01-83-84 (Not found)
21-04-57
43-10-21 (Agreed)
];
Use Subfield
LOAD *,
SubField(Task,'(',1) as TaskNum;
LOAD * INLINE [
Task
71-05-21
23-67-92
01-83-84 (Not found)
21-04-57
43-10-21 (Agreed)
];
Hi Paolo,
You could try something like this in your load script:
task:
LOAD
Text(keepChar (Task, '0123456789-')) as Task
FROM
KeepChars.txt
(txt, codepage is 1252, embedded labels, delimiter is '\t', msq);
Where Keepchars.txt just contains your sample data
Best regards
Andy
Amazing man, it worked perfectly!!
Thank you so much
Hello Sasidhar, it worked with Sunny's suggestion, but thank you anyway for your attention!
Best regards!
Hello Andy, it worked with Sunny's suggestion, but thank you anyway for your attention!
Best regards!