Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How do I eliminate data with a certain string of characters?

Hi,

I have a certain amount of information associated to OrderID's - which are all numeric. However, we have test orders in the system (a lot of them) that all start with 'F'.

I want to try and eliminate these dummy orders and their associated information - but I'm not sure how to write that into the script. in SQL, I use the like function with a wildcard - but it looks like the wildmatch function in Qlikview doesn't duplicate this exactly.

Any suggestions?

Example:

DUMMY DATA        REAL ORDERID

     F653519                    1089136

1 Solution

Accepted Solutions
Not applicable
Author

Or if you specifically need to check for the 'F', you can use index

Where Index(ORDERID,'F')=0

View solution in original post

10 Replies
Not applicable
Author

Hi Andrea,

use a where condition

Where

Isnum(ORDERID)

this will only load numeric values of the ORDERID field

hope that helps

Joe

Not applicable
Author

Or if you specifically need to check for the 'F', you can use index

Where Index(ORDERID,'F')=0

sunny_talwar

Are you trying to remove those rows of data where OrderID has 'F' in it?? If yes then may be use it like this

LOAD yourFields

From XYZ

Where not KeepChar(OrderID, 'F') = 'F'; (or Where not KeepChar(OrderID, 'F') <> 'F';)

HTH

Best,

Sunny

Not applicable
Author

That didn't work, none of the Test OrderID's were eliminated...

buzzy996
Master II
Master II

try this,

IF(wildmatch(DUMMYDATA,'F*'),NULL(),DUMMYDATA )AS NEWDUMMYDATA

Not applicable
Author

That is what I am trying to do, but neither of those worked...

sunny_talwar

LOAD yourFields

From XYZ

Where IsNull(KeepChar(OrderID, 'F');

or

LOAD yourFields

From XYZ

Where Len(Trim(KeepChar(OrderID, 'F')) = 0;

ramoncova06
Specialist III
Specialist III

do the only have and F associated with them ?

did the isnum(orderid), did not work ?  try with

where orderid * 1 >= 1, this should help identify the order that are numbers only

where left(UPPER(orderid),1) <> 'F' gets rid of everything that starts with a 'F'

maxgro
MVP
MVP

1)

what do you get with a

left(trim([DUMMY DATA],1))

?

some F? if yes use that as a filter in the where (QlikView)

2)

if your data come from a sql db you can still use sql function