All Forums Analytics
ddpp 1 post Joined 10/05
31 Jan 2006
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 databasePlease write in TeradataPlease respond ASAP.

rkeith01 4 posts Joined 10/05
31 Jan 2006

DDIn Teradata your example would be:SEL * FROM emp WHERE empnm LIKE 'dd%';

suvomoy 1 post Joined 03/06
21 Mar 2006

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.

ANGEL 20 posts Joined 02/05
21 Mar 2006

Hi,We can use ESCAPE to locate a wildcard character.For example SELECT TABLENAME FROM DBC.TABLESwhere tablename like ('-------\_%)' ESCAPE '\'This will return all tables where '_' is in eighth position. Hope this helpsThanksAngel

You must sign in to leave a comment.