cancel
Showing results for 
Search instead for 
Did you mean: 

'Like' statement

Former Member
0 Kudos

So for illustration of my problem I have created  a simple view consisting of 1 column.

I apply filter thus : Views.ZZ_List.NormalizedName = 'Java 6 Update 11'

and wonderfully this results in 1 row which shows the value 'Java 6 Update 11'

However, in reality, I want this filter to return all rows with the string 'Java' in it.

So in traditional SQL : Like '%Java%'   (or Like '*Java*')

In Information Steward, I see that there is no 'Like' statement.

Hence, reading online, I tried this one : match_regex(Views.ZZ_List.NormalizedName, 'Java', null)

Yet after applying the above, I get zero rows returned.

Also tried :

match_pattern(Views.ZZ_List.NormalizedName, 'Java')

match_pattern(Views.ZZ_List.NormalizedName, '*Java*')

.... and may I say, many more variations.

Please can someone point out what the proper way of achieving a 'like' functionality is ?

Many Thanks

Accepted Solutions (1)

Accepted Solutions (1)

adrian_storen
Active Participant
0 Kudos

In the WHERE statement of a DI View, I can type in LIKE.  For example,

SOURCE_COLUMN LIKE '%Java%'.

Are you trying to do this in a column (ie group the type to list all 'java') or restriction (only see one type - only 'java')?

Former Member
0 Kudos

Ok, so I feel so stupid now, thanks Adrian.

I read online that the statement wasn't available, plus I saw it wasn't listed in the Advanced Editor .. I really should know better and at least TRIED to use it.

Humble apologies.

vpawate
Explorer
0 Kudos

Nice Tip,  Thanks for sharing . Didn't know it existed. Tried it in one of my views - works great. !

Answers (0)