SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'events0301'
HTH, P.
-----Original Message----- From: Diana Nichols [mailto:nichols2000@mindspring.com] Sent: Thursday, April 12, 2001 11:07 AM To: CF-Talk Subject: existence of table
Is there a way to check for the existence of a database table (SQL 2000)?
I have a calendar which stores each month's events in a separate table (events0301), and if the user hits the "last month" button past where the tables start, it throws an error.
I tried a cftry/cfcatch on the query, but....To complicate matters, I'm using a UNION on "this" month and "last" month to show any events not cleared from the previous month. So, the first table is events0301, and the cftry/cfcatch scenario won't let them view events from March because February table doesn't exist.
Insights, suggestions?
as always, TIA!!
Diana
************* Diana Nichols Webmistress http://www.lavenderthreads.com 770.434.7374
"One man's magic is another man's engineering." ---Lazarus Long