What you want to do is test to see if the table is there.  If it is Insert
data into it, if not create it first and then insert into it right?  What
Nick has done is to provide you with the first line of code you need.  If
the test succeeds then you want to only perform an Insert, if it fails (i.e.
the ELSE part) then you want to do a create.  Even better I'd do nothing if
it does succeed and a create if the test fails and then perform an insert
whatever.  This make sense?

-----Original Message-----
From: Jon Tillman [mailto:[EMAIL PROTECTED]]
Sent: 24 August 2000 11:34
To: [EMAIL PROTECTED]
Subject: RE: checking for tables?


On Thu, 24 Aug 2000, DeVoil, Nick spake thusly:
> Access!
> Good point!
> 
> Try
> 
> IF EXISTS(SELECT * FROM MSysObjects WHERE ParentID = (SELECT Id FROM
> MSysObjects WHERE Name = 'Tables') AND Name = '<tablename>')

I hate to be a pest, but do you happen to know how thta would work with an
INSERT INTO, instead of SELECT FROM?

> 
> Nick
> 
> 
> **********************************************************************
> Information in this email is confidential and may be privileged. 
> It is intended for the addressee only. If you have received it in error,
> please notify the sender immediately and delete it from your system. 
> You should not otherwise copy it, retransmit it or use or disclose its
> contents to anyone. 
> Thank you for your co-operation.
> **********************************************************************
>
----------------------------------------------------------------------------
--
> Archives: http://www.mail-archive.com/[email protected]/
> 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.
-- 
***********************************************
 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/[email protected]/
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/[email protected]/
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.

Reply via email to