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

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



I'm not sure it matters if you do the setup or not.  If it's in your
first procedure of the program/report section of your program, it should
stop early enough for you.  I don't think you gain anything by having it
in the setup instead of a bit further in the program.

-----Original Message-----
From: sqr-users-bounces+bstone=fastenal.com@sqrug.org
[mailto:sqr-users-bounces+bstone=fastenal.com@sqrug.org] On Behalf Of
Jay Sagadraca
Sent: Thursday, April 27, 2006 4:17 PM
To: sqr users
Subject: [sqr-users] if not exists (select * from sysobjects where
name='<>') = processing should stop

Hello Gurus,
   
      Thank you for your help.  But 1 more question please.  How about
in the begin-setup area?  Can we stop the whole process if the table is
not created? 
   
    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 
   
  Thanks,
   




Jay V. Sagadraca

Markham, Ontario, Canada

email : knight7883@yahoo.ca

                
---------------------------------
Make Yahoo! Canada your Homepage Yahoo! Canada Homepage  

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

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