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 » Functions » Sybase IQ

Functions in Sybase IQ

     




Declaring functions in Sybase IQ .. handy for those math/analytical functions which might be lacking.




drop function f_invoice_num
go

create function f_invoice_num ( @serial_num varchar(15) ) returns integer
as

declare @key integer

select @key = invoice_num from v_invoice_history where serial_num = @serial_num

if @@rowcount = 0
select @key = 0

return @key
go


declare @key integer

select @key = f_invoice_num ('J433T556')

select @key as ID
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.