Search code examples
t-sqlsap-ase

Not able Create GLOBAL TEMPORARY in SYBASE ASE 15.7.0


USE XXX
go
CREATE GLOBAL TEMPORARY  TABLE #dbo.tbl_gbl_temp11
(parent_deal_id numeric(10,0) not null,
  deal_id numeric(10,0) not null,
  code_name varchar(100) null
)
go
IF OBJECT_ID('dbo.tbl_gbl_temp1') IS NOT NULL
    PRINT '<<< CREATED TABLE dbo.tbl_gbl_temp1 >>>'
ELSE
    PRINT '<<< FAILED CREATING TABLE dbo.tbl_gbl_temp1 >>>'
go

When I execute the above it gives the following error:

Number (156) Severity (15) State (2) Server (XXX) Incorrect syntax near the keyword 'TABLE'.


Solution

  • CREATE GLOBAL TEMPORARY TABLE is supported in ASE 16.0 SP02.