Teradata function equivalent to 'LIKE %..%' in Teradata

Analytics
N/A

Teradata function equivalent to 'LIKE %..%' in Teradata

Hi all,
Can anyone please let me know A teradata function which is equivalent to LIKE in Oracle.

Eg. Select * from EMP where empnm=like'dd%' in oracle database

Please write in Teradata

Please respond ASAP.
3 REPLIES

Re: Teradata function equivalent to 'LIKE %..%' in Teradata

DD

In Teradata your example would be:

SEL * FROM emp WHERE empnm LIKE 'dd%';

Re: Teradata function equivalent to 'LIKE %..%' in Teradata

Hi all,

Can we try same kind of pattern matching involving "LIKE" operator when i am looking for a special character like '_'.

As the 'instr' function does not work with Teradata (Upto my knowledge) the only workaround is using the 'substr' on multiple occasion to match the special character.

A solution is badly needed.
Enthusiast

Re: Teradata function equivalent to 'LIKE %..%' in Teradata

Hi,

We can use ESCAPE to locate a wildcard character.

For example

SELECT TABLENAME FROM DBC.TABLES
where tablename like ('-------\_%)' ESCAPE '\'

This will return all tables where '_' is in eighth position.

Hope this helps

Thanks
Angel