Ver Mensaje Individual
  #1 (permalink)  
Antiguo 02/11/2011, 08:52
Lita22
 
Fecha de Ingreso: septiembre-2007
Mensajes: 3
Antigüedad: 16 años, 8 meses
Puntos: 0
Pregunta Sybase 15 Tabla Temporal

Hola, tengo el siguiente problema; en sybase no puedo crear tablas temporales dentro de una transaccion ej:
Begin tran
CREATE TABLE #ActivosInactivos
(
Folio NUMERIC IDENTITY,
RutGiradorAct NUMERIC,
NroSolicitudAct NUMERIC,
Causal CHAR(6),
RegionAct CHAR (6),
Estado CHAR(6),
FechaProtesto DATETIME
)
Commit Tran
ERROR: "The 'CREATE TABLE' command is not allowed within a multi-statement transaction in the 'tempdb' database."

Entonces, creo que si cambio las tablas temporales por variables del tipo table lo aceptaría dendro de "begin tran", pero no se como declarar variables de tipo table en sybase, lo he intentado de 2 formas y no acepta la syntaxis.
Ej:

DECLARE @tmpTab TABLE
(
Offset SMALLINT
, PeriodStart DATETIME
, PeriodEnd DATETIME
)
ERROR: "Incorrect syntax near the keyword 'TABLE'."

---==============
DECLARE LOCAL TEMPORARY TABLE temp_tb (
Campo1 char(100), campo2 double)

ERROR:"Incorrect syntax near the keyword 'TEMPORARY'."

Espero que alguien sapa solucionar esto.

Saludos...