|
Archives of the TeradataForumMessage Posted: Wed, 07 Mar 2012 @ 12:39:01 GMT
<-- Anonymously Posted: Wednesday, March 07, 2012 06:58 --> Hi, I am seeing an issue with column name LIKE with '%' usage. Please see below example to create 2 tables and find them using LIKE keyword. CT MYDB.HI_WORLD(C1 INT); CT MYDB.HELLO_WORLD(C1 INT); SELECT * FROM DBC.TABLES WHERE DATABASENAME='MYDB' AND TABLENAME LIKE '%WORLD' ; ==> no rows returned SELECT * FROM DBC.TABLES WHERE DATABASENAME='MYDB' AND TABLENAME LIKE 'H%WORLD' ; ==> no rows returned SELECT * FROM DBC.TABLES WHERE DATABASENAME='MYDB' AND TABLENAME LIKE 'H%' ; ==> both the rows returned I am expecting to see both the rows with all the 3 SELECT SQLs above. But only 3rd SELECT SQL works fine and others not. Is it something I am missing here ? Or is there any guideline that % can't be used at start of the string and middle of the string but only at the end of the string ? Thanks.
| ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||