|
|
Archives of the TeradataForum
Message Posted: Wed, 07 Mar 2012 @ 13:20:45 GMT
Subj: | | Re: Like keyword issues with % |
|
From: | | Machha Narayan Rao Naidu |
HI,
CT MYDB.HI_WORLD(C1 INT);
*** Table has been created.
*** Total elapsed time was 1 second.
BTEQ -- Enter your DBC/SQL request or BTEQ command:
CT MYDB.HELLO_WORLD(C1 INT);
*** Table has been created.
*** Total elapsed time was 1 second.
BTEQ -- Enter your DBC/SQL request or BTEQ command:
SELECT * FROM DBC.TABLES WHERE DATABASENAME='MYDB' AND TABLENAME LIKE '%WORLD' ;
SELECT * FROM DBC.TABLES WHERE DATABASENAME='MYDB' AND TABLENAME LIKE '%WORLD' ;
*** Query completed. No rows found.
*** Total elapsed time was 1 second.
BTEQ -- Enter your DBC/SQL request or BTEQ command:
SELECT * FROM DBC.TABLES WHERE DATABASENAME='MYDB' AND TABLENAME LIKE '%WORLD%' ;
SELECT * FROM DBC.TABLES WHERE DATABASENAME='MYDB' AND TABLENAME LIKE '%WORLD%' ;
*** Query completed. 2 rows found. 24 columns returned.
*** Total elapsed time was 1 second.
DatabaseName TableName Version
------------ ------------------------------ ------------
MYDB HI_WORLD 1
MYDB HELLO_WORLD 1
BTEQ -- Enter your DBC/SQL request or BTEQ command:
BTEQ -- Enter your DBC/SQL request or BTEQ command:
SELECT * FROM DBC.TABLES WHERE DATABASENAME='MYDB' AND TABLENAME LIKE 'H%WORLD' ;
SELECT * FROM DBC.TABLES WHERE DATABASENAME='MYDB' AND TABLENAME LIKE 'H%WORLD' ;
*** Query completed. No rows found.
*** Total elapsed time was 1 second.
BTEQ -- Enter your DBC/SQL request or BTEQ command:
SELECT * FROM DBC.TABLES WHERE DATABASENAME='MYDB' AND TABLENAME LIKE 'H%WORLD%';
SELECT * FROM DBC.TABLES WHERE DATABASENAME='MYDB' AND TABLENAME LIKE 'H%WORLD%';
*** Query completed. 2 rows found. 24 columns returned.
*** Total elapsed time was 1 second.
DatabaseName TableName Version
------------ ------------------------------ ------------
MYDB HELLO_WORLD 1
MYDB HI_WORLD 1
BTEQ -- Enter your DBC/SQL request or BTEQ command:
SELECT * FROM DBC.TABLES WHERE DATABASENAME='MYDB' AND TABLENAME LIKE 'HI%WORLD%';
SELECT * FROM DBC.TABLES WHERE DATABASENAME='MYDB' AND TABLENAME LIKE 'HI%WORLD%';
*** Query completed. One row found. 24 columns returned.
*** Total elapsed time was 1 second.
DatabaseName TableName Version
------------ ------------------------------ ------------
MYDB HI_WORLD 1
Hope you got it like clause should end with "%".
Thanks
Machha
| |