I now get this error:
IF NOT EXISTS (select * from dbo.sysobjects where id = object_id(N'COMPONENT_EVEN
BEGIN
execute ("
CREATE TABLE COMPONENT_EVENT (
COMPONENT_EVENT_ID integer IDENTITY,
COMPONENT_CD nvarchar(50) NOT NULL,
COMPONENT_DESC nvarchar(50) NULL,
COMPONENT_EVENT nvarchar(30) NULL,
COMPONENT_LEVEL nvarchar(30) NULL,
EVENT_DT datetime DEFAULT getdate() NOT NULL,
CTRL_INSERT_DT datetime DEFAULT getdate() NOT NULL,
CTRL_UPDATE_DT datetime DEFAULT getdate() NOT NULL
)
ALTER TABLE COMPONENT_EVENT
ADD CONSTRAINT CMPNNTVNT_PK PRIMARY KEY (COMPONENT_EVENT_ID ASC)
")
END
Ignoring error: [wm-cjdbc36-0007][Sybase JDBC Driver][Sybase]The identifier that starts with '"
CREATE TABLE COMP' is too long. Maximum length is 28.
Main Topics
Browse All Topics





by: bretPosted on 2007-02-01 at 15:05:12ID: 18448617
As an aside: The error I think you are getting isn't being rasied at EXECUTE time, but
T') and type = 'U')
somewhat earlier during normalization, when ASE is trying to create a normalized
query tree that identifies all the objects involved by object id. So ASE isn't actually
yet trying to create the object.
To avoid the error message:
Put the CREATE and ALTER statements within the contect of a dynamic SQL
EXECUTE statement - these are only compiled at run time when they
are actually called.
i.e.
IF NOT EXISTS (select * from dbo.sysobjects where id = object_id(N'COMPONENT_EVEN
BEGIN
execute ("
CREATE TABLE COMPONENT_EVENT (
COMPONENT_EVENT_ID integer IDENTITY,
COMPONENT_CD nvarchar(50) NOT NULL,
COMPONENT_DESC nvarchar(50) NULL,
COMPONENT_EVENT nvarchar(30) NULL,
COMPONENT_LEVEL nvarchar(30) NULL,
EVENT_DT datetime DEFAULT getdate() NOT NULL,
CTRL_INSERT_DT datetime DEFAULT getdate() NOT NULL,
CTRL_UPDATE_DT datetime DEFAULT getdate() NOT NULL
)
ALTER TABLE COMPONENT_EVENT
ADD CONSTRAINT CMPNNTVNT_PK PRIMARY KEY (COMPONENT_EVENT_ID ASC)
")
END
go