You can also use the system stored procedure SP_Tables, passing it the table
name.

Bob

-----Original Message-----
From: Peter Stolz [mailto:[EMAIL PROTECTED]]
Sent: April 12, 2001 11:32 AM
To: CF-Talk
Subject: RE: existence of table


SELECT *
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_NAME = 'events0301'

HTH,
P.

-----Original Message-----
From: Diana Nichols [mailto:[EMAIL PROTECTED]]
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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to