Tag Archive: tsql


I know you can simulate it by creating a temp table with an identity column, delete old rows, getSybase the max, etc but still… PostgreSQL’s create sequence would be very handy…  btw, Oracle has it too

It would allow us to do things like pgTAP with ease..  Check out the slides for pgTAP :)

just my opinion… grrrr

I’ve created ISUG enhancement request # 3449 for this.

create function ok (@boolean bit)
returns varchar(2000) as
declare @output_string varchar(2000)
select @output_string = case when @boolean = 1 then "" else "not " end
set @output_string = @output_string + "ok"
return @output_string
end

Msg 156, Level 15, State 2
Server ‘DBADEV1′, Procedure ‘ok’, Line 7
Incorrect syntax near the keyword ‘end’.
I’m trying to write an ASE implementation of TAP. A rudimentary TAP implementation for PostgreSQL is at http://www.justatheory.com/computers/databases/postgresql/introducing_pgtap.html
I’ve been able to use case in SQL UDFs before – see http://froebe.net/blog/2007/10/10/porting-mysqls-date_format-function-to-sybase-ase-1502/
Adaptive Server Enterprise/15.0.2/EBF 15654 ESD#4/P/Linux Intel/Linux 2.4.21-47.ELsmp i686/ase1502/2528/32-bit/FBO/Sat Apr 5 05:18:42 2008
I’m just missing something blindingly simple… I just know it.