zimmer9
asked on
How would you modify a Stored Procedure from executing if a table does not exist ?
I am developing an Access ADP application using Access as the front end and SQL Server as the back end database. I execute a Stored Procedure in the Attach Code Snippet that has 3 parts.
Is there a way to execute Part A and if the table in Part A doesn't exist, exit the Stored Procedure ?
If the table in Part A exists, then execute Parts B and C.
Is there a way to execute Part A and if the table in Part A doesn't exist, exit the Stored Procedure ?
If the table in Part A exists, then execute Parts B and C.
Part A)
SELECT *
FROM ztblRefresh
Part B)
DELETE FROM ztblCustomers
Part C)
INSERT INTO ztblCustomers
SELECT ztblCustomersNew.*
FROM ztblCustomersNew
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If so, it'd look something like this:
Open in new window