[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

[sqr-users] if not exists (select * from sysobjects where name ='<>') = processing should stop



Hello Gurus,
   
       We have the following :
   
  SunOS 5.9 
   
  SQR version 6.2
   
  SYBASE_VERSION=12.5.0
   
       My problem is :
   
  begin-setup 
begin-sql on-error=stop 
if not exists (select 1 from sysobjects where name = 'Transaction_Table') 
 begin 
  raiserror 20004 "Table: Transaction_Table do not exist " 
 end 
end-sql 
begin-sql 
if exists ( select 1 from sysobjects where name = 'Clients') 
   begin
       print "Found the table ..."
      end
  end-sql 
end-setup 
   
  Begin-report 
End-report 
   
   
  I would like to abruptly stop the processing of the whole sqr if the table is 
not on the sysobjects system table.  I tried this (above) but it still goes to 
the next begin-sql and process it.  Is there another way to do this or another 
command to force the sqr to totally stop the processing if it didn't find the 
table?
   
  Thanks for the help.
   
        Jay Sagadraca

                                
---------------------------------
Make free worldwide PC-to-PC calls. Try the new Yahoo! Canada Messenger with 
Voice

_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users