I am attempting to identify the posts creating secrets in ASE.

Sybase has got the solution right here: http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.help.ase.15.5/title.htm

I've got a slightly modified version below, nevertheless it only works (just like sybase's solution) basically lookup for any single table, but I wish to make use of the 'in' keyword and appear up all of the tables over night.

Could I recieve outside assistance, why the answer below doesn't work? It only creates their email list of posts for 't5' table.

declare @keycnt integer
declare @objname varchar(256)
select @keycnt = keycnt, @objname = sysobjects.name from sysindexes, sysobjects
     where 
     --sysobjects.id = object_id("t5")
     --sysobjects.id = object_id("t4")
     sysobjects.id in (object_id("t5"), object_id("t4"))
     and sysobjects.id = sysindexes.id
     and indid = 1
while @keycnt > 0
begin
     select index_col(@objname, 1, @keycnt)
     select @keycnt = @keycnt - 1
end

Fundamental essentials tables I am using for testing:

CREATE TABLE t4(
    [value] [varchar] (500) not NULL ,
  CONSTRAINT pk_g4 PRIMARY KEY CLUSTERED (
    [value]
  )
)

CREATE TABLE t5(
    [myvalue] [varchar] (500) not NULL ,
  CONSTRAINT pk_g4 PRIMARY KEY CLUSTERED (
    [myvalue]
  )
)

You've two solutions:

Using OR

declare @keycnt integer
declare @objname varchar(256)
select @keycnt = keycnt, @objname = sysobjects.name from sysindexes, sysobjects
     where 
     --sysobjects.id = object_id("t5")
     --sysobjects.id = object_id("t4")
     (sysobjects.id = object_id("t5") OR sysobjects.id = object_id("t4"))
     and sysobjects.id = sysindexes.id
     and indid = 1
while @keycnt > 0
begin
     select index_col(@objname, 1, @keycnt)
     select @keycnt = @keycnt - 1
end

Or Using Dynamic SQL to correctly make use of the IN.