Problems using LIKE ANY on TD 13.1

Database

Problems using LIKE ANY on TD 13.1

<SCRIPT id="dstb-id" language="javascript"><BR />if(typeof(dstb)!= "undefined"){ dstb();} </SCRIPT>
Recently we switched over to TD 13 .

Previous code that contained statements with LIKE ANY('CRITERIA1%', 'CRITERIA2%', 'CRITERIA3%') syntax is now returning only matches on the first criteria matches.

example

, CASE WHEN CNTRY LIKE ANY ('GEORG%', 'TURK%', 'ITALY%') then 'REGION1'

          WHEN CNTRY LIKE ANY ('RUSSIA%', 'KAZ%', 'UZB%') then 'REGION2' end as REGION

on version 12 the first line we would get matches for any of the 3

on version 13 we began to only see the matches for georg%

   so to test and verify it wasnt catching the other 2 criteria we broke it into individual lines.

, CASE WHEN CNTRY LIKE ('GEORG%')  then 'REGION1'

          WHEN CNTRY LIKE ('TURK%')  then 'REGION1'

          WHEN CNTRY LIKE ('ITALY%')  then 'REGION1'

...

   end as REGION

once we did this the result set was similar to the original code running on version 12

Has anyone else experienced similar issues with LIKE ANY results.

1 REPLY
Teradata Employee

Re: Problems using LIKE ANY on TD 13.1

The LIKE ANY predicate is expected to work. I just tested your example CASE expression on Teradata Database 13.0, 13.10, 14.0, and 14.10 and I received the correct results on all those versions of the Teradata Database.

If you are a customer, then I recommend that you open a customer incident to report the problem.