Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   Other Scripting Languages (http://www.programmingforums.org/forum39.html)
-   -   SQL - Getting tables in a like (http://www.programmingforums.org/showthread.php?t=15854)

Robocop May 21st, 2008 8:03 AM

SQL - Getting tables in a like
 
I have some tables that have prefixes like WRT_(WRT_0201, WRT_0202, WRT_0203). I need help in how to get data from the tables that are for example like 'WRT_%' and are in a specific date range (all the tables have the same columns including the date)

Is this possible? Or a workaround?

Thanks

Arla May 21st, 2008 1:44 PM

Re: SQL - Getting tables in a like
 
Probably depends on the Database type, in DB2 you could goto the SYSIBM.SYSTABLES table (think that's what it's called) in SqlLite there is a query to find tables that are named like something... so I think it is doable, ugly, but doable.


All times are GMT -5. The time now is 4:09 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC