Custom Search
www.rocket99.com : Technical Guides Sybase Oracle UNIX Javascript


Technical Guides
Sybase
Oracle
UNIX
Javascript




Of Interest

Business Intelligence and Analytics



Oracle Training





Sybase » T-SQL » exit » abort

Aborting a T-SQL script

     




Ability to exit/abort a SQL script:
The below script will exit if the count is zero, part 2 will no execute.
Note that flushmessage is needed to see output here


set flushmessage on
go
set nocount on
go

declare @count1 integer

select @count1 = count(1) from company_account

select @count1

if (@count1 = 0)
begin
print "Exit condition found ..."
select syb_quit()
end
go

print 'Part 2 of script'
go
select count(1) from company_invoice
go








Sybase : Related Topics


Sybase Web Site
Sybase iAnywhere Mobile Web Site
Oracle Enterprise Web Site



Get the latest Rocket99 news and tech tips via






Site Index About this Guide to Sybase, Oracle, and UNIX Contact Us Advertise on this site




Copyright © 2016 Stoltenbar Inc All Rights Reserved.