I tend to go for the simple approach:
if object_id('tablename') is null
create table tablename ( ... )
Since it's all done in one statement in SQL, you don't have to worry about
reentrancy.
-Rick
-----Original Message-----
From: Jon Tillman [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 24, 2000 6:09 AM
To: [EMAIL PROTECTED]
Subject: checking for tables?
quick question:
is there any way to check to see if a table exists without querying it, and
throwing an error if it does not? I want to either CREATE or INSERT a table
depending on whether or not it already exists....
--
***********************************************
Jon Tillman
LINUX USER: #141163
ICQ: 4015362
http://www.eruditum.org
[EMAIL PROTECTED]
***********************************************
Help Jon build a network!
Looking for giveaway computers & parts
Current Need: Tape Drive & PI/PII processors
Email me to find out how you can help
***********************************************
----------------------------------------------------------------------------
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.