Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 07 Mar 2012 @ 13:20:45 GMT


     
  <Prev Next>   <<First <Prev Next> Last>>  


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



     
  <Prev Next>   <<First <Prev Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023