0

I am converting a SQL stored procedure to Sybase ASE.

I came cross some datatypes like:

declare @mask ident
declare @type ident
declare @start varchar(max)

Ident and varchar(max) are not supported in Sybase ASE. What will be the correct alternative datatype which I can use?

Danny Beckett
  • 20,529
  • 24
  • 107
  • 134
antosnowin
  • 221
  • 2
  • 6
  • 13

1 Answers1

1

In Sybase ASE, the value for a varchar can be anything up to the pagesize of the server (2k,4k,8k or 16k are the available page sizes.)

Sybase doesn't have an ident datatype, but you can create a user defined datatype that can be used instead.

sp_addtype ident, "numeric(5)", "identity"

There's more information here, in Sybase's Transact-SQL User's Guide

Mike Gardner
  • 6,611
  • 5
  • 24
  • 34
  • Thanks Michael..Do we have any alternative for text datatype ? – antosnowin Feb 27 '13 at 09:32
  • *text* is a valid datatype, so no alternative is necessary. – Mike Gardner Feb 27 '13 at 13:49
  • I m able to use text datatype only while creating table. It is not supported as parameter to stored procedure..Geeting exception if i try to create SP with text datatype. "TEXT,UNITEXT,IMAGE datatypes are invalid for parameters or local variables..sybase error code:2739 " – antosnowin Feb 27 '13 at 14:48