getting the tablename inside the select

i am currently using to get all the tablenames from mysql database

  <cfquery name="qtable" datasource="#request.dsn#">
   show tables from #request.dsn#
  <cfset whichcolumn = 'qtable.Tables_in_' & #request.dsn#>
  <cfoutput query="qtable">

but i want to list all the tables which have a starting name of scriptasof

The thing is above works if i do not specify the like attribute but when i apply like attribute, it fails

because my tables names are as


basically i want to extract the date which is 20_11_2011 from the table names starting with scriptasof so i can list these all dates in a select statement, so please guide

LVL 16
Gurpreet Singh RandhawaCEOAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Rahul GadeSr. ArchitectCommented:

You may want to use something like, just make sure that collate of your information_schema database and your database is some, otherwise you will also need to apply conversion.

SELECT table_name, table_type, engine FROM information_schema.tables WHERE table_name like 'scriptasof%' ORDER BY table_name DESC;

-Rahul Gade

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ColdFusion Language

From novice to tech pro — start learning today.