Answered select statement to show tables

  • Friday, May 19, 2006 2:21 PM
     
     
    Does anyone know the syntax for a script that will bring back all the tables in a database that begin with "CAPA" and "CAPD"?

All Replies

  • Friday, May 19, 2006 2:33 PM
     
     Answered

    Select TABLE_NAME from INFORMATION_SCHEMA.TABLES
    Where Left(TABLE_NAME,4) = 'CAPA' or Left(TABLE_NAME,4) = 'CAPD'

  • Friday, May 19, 2006 4:05 PM
     
     
    That's great thanks