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
|
|
|
Get the latest Rocket99 news and tech tips via
|