pmcmicha
Technical User
- May 25, 2000
- 353
I need to verify if a table already exists or not in a certain database. If not, then the process will run, otherwise it will exit out. This is what I have, but it does not seem to be working:
if exists ( select 1 from sysobjects where name = 'DB_IN_QUESTION' )
begin
return
end
else
begin
DO_UPDATES_HERE
end
Regardless, it seems to go to the updates even if the table exists in sysobjects. I am not sure what I am doing incorrectly, could someone please help?
Sybase Version: 11.9.2 Adaptive Server
Thanks in advance.
if exists ( select 1 from sysobjects where name = 'DB_IN_QUESTION' )
begin
return
end
else
begin
DO_UPDATES_HERE
end
Regardless, it seems to go to the updates even if the table exists in sysobjects. I am not sure what I am doing incorrectly, could someone please help?
Sybase Version: 11.9.2 Adaptive Server
Thanks in advance.