------------------------------------------------------------
IF 0 = (SELECT count(*) from [sysobjects] where ([xtype] = 'U' or [xtype] = 'V') and [name] = 'ut_ZeitTerminalPosten')
BEGIN
CREATE TABLE [dbo].[ut_ZeitTerminalPosten]
(
   [RecId]  integer NOT NULL
  ,[MandId] integer DEFAULT 1
  ,[PostenGuid] char(40) DEFAULT ' '
  ,[LfdNr] integer DEFAULT 0
  ,[Knr] char(20) DEFAULT ' '
  ,[Uid] char(30) DEFAULT ' '
  ,[Datum] datetime DEFAULT CONVERT(datetime,'1900-01-01',120)
  ,[Uhrzeit] char(5) DEFAULT ' '
  ,[Annr] char(20) DEFAULT ' '
  ,[Belegnr] char(20) DEFAULT ' '
  ,[StatusNum] integer DEFAULT 0
  ,[StatusText] char(10) DEFAULT ' '
  ,[Comment] char(50) DEFAULT ' '
  ,[TicketGuid] char(40) DEFAULT ' '
  ,[Vkz] integer DEFAULT 0
  ,[Closed] tinyint DEFAULT 0
  ,[ClosedBy] char(40) DEFAULT ' '
  ,[InsertDate] datetime DEFAULT CONVERT(datetime,'1900-01-01',120)
  ,[InsertTime] char(5) DEFAULT ' '
  ,[Minuten] integer DEFAULT 0
  ,[ErrorCode] integer DEFAULT 0
  CONSTRAINT [Pk_ZeitTerminalPosten]  PRIMARY KEY NONCLUSTERED ( [RecId] )
)
END
GO
IF 0 < (SELECT count(*) from [sysobjects] where [xtype] = 'TR'   and [name] = 'tr_ZeitTerminalPosten_KeyDel')
  DROP TRIGGER [dbo].[tr_ZeitTerminalPosten_KeyDel]
GO
IF 0 < (SELECT count(*) from [sysobjects] where [xtype] = 'TR'   and [name] = 'tr_ZeitTerminalPosten_KeyUpd')
  DROP TRIGGER [dbo].[tr_ZeitTerminalPosten_KeyUpd]
GO
IF 0 < (SELECT count(*) from [sysobjects] where [xtype] = 'U' and [name] = 'ut_ZeitTerminalPosten_Keys')
  DROP TABLE [dbo].[ut_ZeitTerminalPosten_Keys]
GO

IF 0 = (select count(*) from syscolumns sc inner join sysobjects so
        on sc.[id] = so.[id] and so.[name] = 'ut_ZeitTerminalPosten' and sc.[name] = 'PostenGuid')
BEGIN
  ALTER TABLE [dbo].[ut_ZeitTerminalPosten] ADD [PostenGuid] char(40) NOT NULL DEFAULT ' '
END
GO
IF 0 = (select count(*) from syscolumns sc inner join sysobjects so
        on sc.[id] = so.[id] and so.[name] = 'ut_ZeitTerminalPosten' and sc.[name] = 'LfdNr')
BEGIN
  ALTER TABLE [dbo].[ut_ZeitTerminalPosten] ADD [LfdNr] integer NOT NULL DEFAULT 0
END
GO
IF 0 = (select count(*) from syscolumns sc inner join sysobjects so
        on sc.[id] = so.[id] and so.[name] = 'ut_ZeitTerminalPosten' and sc.[name] = 'Knr')
BEGIN
  ALTER TABLE [dbo].[ut_ZeitTerminalPosten] ADD [Knr] char(20) NOT NULL DEFAULT ' '
END
GO
IF 0 = (select count(*) from syscolumns sc inner join sysobjects so
        on sc.[id] = so.[id] and so.[name] = 'ut_ZeitTerminalPosten' and sc.[name] = 'Uid')
BEGIN
  ALTER TABLE [dbo].[ut_ZeitTerminalPosten] ADD [Uid] char(30) NOT NULL DEFAULT ' '
END
GO
IF 0 = (select count(*) from syscolumns sc inner join sysobjects so
        on sc.[id] = so.[id] and so.[name] = 'ut_ZeitTerminalPosten' and sc.[name] = 'Datum')
BEGIN
  ALTER TABLE [dbo].[ut_ZeitTerminalPosten] ADD [Datum] datetime NOT NULL DEFAULT CONVERT(datetime,'1900-01-01',120)
END
GO
IF 0 = (select count(*) from syscolumns sc inner join sysobjects so
        on sc.[id] = so.[id] and so.[name] = 'ut_ZeitTerminalPosten' and sc.[name] = 'Uhrzeit')
BEGIN
  ALTER TABLE [dbo].[ut_ZeitTerminalPosten] ADD [Uhrzeit] char(5) NOT NULL DEFAULT ' '
END
GO
IF 0 = (select count(*) from syscolumns sc inner join sysobjects so
        on sc.[id] = so.[id] and so.[name] = 'ut_ZeitTerminalPosten' and sc.[name] = 'Annr')
BEGIN
  ALTER TABLE [dbo].[ut_ZeitTerminalPosten] ADD [Annr] char(20) NOT NULL DEFAULT ' '
END
GO
IF 0 = (select count(*) from syscolumns sc inner join sysobjects so
        on sc.[id] = so.[id] and so.[name] = 'ut_ZeitTerminalPosten' and sc.[name] = 'Belegnr')
BEGIN
  ALTER TABLE [dbo].[ut_ZeitTerminalPosten] ADD [Belegnr] char(20) NOT NULL DEFAULT ' '
END
GO
IF 0 = (select count(*) from syscolumns sc inner join sysobjects so
        on sc.[id] = so.[id] and so.[name] = 'ut_ZeitTerminalPosten' and sc.[name] = 'StatusNum')
BEGIN
  ALTER TABLE [dbo].[ut_ZeitTerminalPosten] ADD [StatusNum] integer NOT NULL DEFAULT 0
END
GO
IF 0 = (select count(*) from syscolumns sc inner join sysobjects so
        on sc.[id] = so.[id] and so.[name] = 'ut_ZeitTerminalPosten' and sc.[name] = 'StatusText')
BEGIN
  ALTER TABLE [dbo].[ut_ZeitTerminalPosten] ADD [StatusText] char(10) NOT NULL DEFAULT ' '
END
GO
IF 0 = (select count(*) from syscolumns sc inner join sysobjects so
        on sc.[id] = so.[id] and so.[name] = 'ut_ZeitTerminalPosten' and sc.[name] = 'Comment')
BEGIN
  ALTER TABLE [dbo].[ut_ZeitTerminalPosten] ADD [Comment] char(50) NOT NULL DEFAULT ' '
END
GO
IF 0 = (select count(*) from syscolumns sc inner join sysobjects so
        on sc.[id] = so.[id] and so.[name] = 'ut_ZeitTerminalPosten' and sc.[name] = 'TicketGuid')
BEGIN
  ALTER TABLE [dbo].[ut_ZeitTerminalPosten] ADD [TicketGuid] char(40) NOT NULL DEFAULT ' '
END
GO
IF 0 = (select count(*) from syscolumns sc inner join sysobjects so
        on sc.[id] = so.[id] and so.[name] = 'ut_ZeitTerminalPosten' and sc.[name] = 'Vkz')
BEGIN
  ALTER TABLE [dbo].[ut_ZeitTerminalPosten] ADD [Vkz] integer NOT NULL DEFAULT 0
END
GO
IF 0 = (select count(*) from syscolumns sc inner join sysobjects so
        on sc.[id] = so.[id] and so.[name] = 'ut_ZeitTerminalPosten' and sc.[name] = 'Closed')
BEGIN
  ALTER TABLE [dbo].[ut_ZeitTerminalPosten] ADD [Closed] tinyint NOT NULL DEFAULT 0
END
GO
IF 0 = (select count(*) from syscolumns sc inner join sysobjects so
        on sc.[id] = so.[id] and so.[name] = 'ut_ZeitTerminalPosten' and sc.[name] = 'ClosedBy')
BEGIN
  ALTER TABLE [dbo].[ut_ZeitTerminalPosten] ADD [ClosedBy] char(40) NOT NULL DEFAULT ' '
END
GO
IF 0 = (select count(*) from syscolumns sc inner join sysobjects so
        on sc.[id] = so.[id] and so.[name] = 'ut_ZeitTerminalPosten' and sc.[name] = 'InsertDate')
BEGIN
  ALTER TABLE [dbo].[ut_ZeitTerminalPosten] ADD [InsertDate] datetime NOT NULL DEFAULT CONVERT(datetime,'1900-01-01',120)
END
GO
IF 0 = (select count(*) from syscolumns sc inner join sysobjects so
        on sc.[id] = so.[id] and so.[name] = 'ut_ZeitTerminalPosten' and sc.[name] = 'InsertTime')
BEGIN
  ALTER TABLE [dbo].[ut_ZeitTerminalPosten] ADD [InsertTime] char(5) NOT NULL DEFAULT ' '
END
GO
IF 0 = (select count(*) from syscolumns sc inner join sysobjects so
        on sc.[id] = so.[id] and so.[name] = 'ut_ZeitTerminalPosten' and sc.[name] = 'Minuten')
BEGIN
  ALTER TABLE [dbo].[ut_ZeitTerminalPosten] ADD [Minuten] integer NOT NULL DEFAULT 0
END
GO
IF 0 = (select count(*) from syscolumns sc inner join sysobjects so
        on sc.[id] = so.[id] and so.[name] = 'ut_ZeitTerminalPosten' and sc.[name] = 'ErrorCode')
BEGIN
  ALTER TABLE [dbo].[ut_ZeitTerminalPosten] ADD [ErrorCode] integer NOT NULL DEFAULT 0
END
GO
IF 40 > (select length from syscolumns sc inner join sysobjects so
        on sc.[id] = so.[id] and so.[name] = 'ut_ZeitTerminalPosten' and sc.[name] = 'PostenGuid')
BEGIN
  ALTER TABLE [dbo].[ut_ZeitTerminalPosten] ALTER COLUMN [PostenGuid] char(40)
END
GO
IF 20 > (select length from syscolumns sc inner join sysobjects so
        on sc.[id] = so.[id] and so.[name] = 'ut_ZeitTerminalPosten' and sc.[name] = 'Knr')
BEGIN
  ALTER TABLE [dbo].[ut_ZeitTerminalPosten] ALTER COLUMN [Knr] char(20)
END
GO
IF 30 > (select length from syscolumns sc inner join sysobjects so
        on sc.[id] = so.[id] and so.[name] = 'ut_ZeitTerminalPosten' and sc.[name] = 'Uid')
BEGIN
  ALTER TABLE [dbo].[ut_ZeitTerminalPosten] ALTER COLUMN [Uid] char(30)
END
GO
IF 5 > (select length from syscolumns sc inner join sysobjects so
        on sc.[id] = so.[id] and so.[name] = 'ut_ZeitTerminalPosten' and sc.[name] = 'Uhrzeit')
BEGIN
  ALTER TABLE [dbo].[ut_ZeitTerminalPosten] ALTER COLUMN [Uhrzeit] char(5)
END
GO
IF 20 > (select length from syscolumns sc inner join sysobjects so
        on sc.[id] = so.[id] and so.[name] = 'ut_ZeitTerminalPosten' and sc.[name] = 'Annr')
BEGIN
  ALTER TABLE [dbo].[ut_ZeitTerminalPosten] ALTER COLUMN [Annr] char(20)
END
GO
IF 20 > (select length from syscolumns sc inner join sysobjects so
        on sc.[id] = so.[id] and so.[name] = 'ut_ZeitTerminalPosten' and sc.[name] = 'Belegnr')
BEGIN
  ALTER TABLE [dbo].[ut_ZeitTerminalPosten] ALTER COLUMN [Belegnr] char(20)
END
GO
IF 10 > (select length from syscolumns sc inner join sysobjects so
        on sc.[id] = so.[id] and so.[name] = 'ut_ZeitTerminalPosten' and sc.[name] = 'StatusText')
BEGIN
  ALTER TABLE [dbo].[ut_ZeitTerminalPosten] ALTER COLUMN [StatusText] char(10)
END
GO
IF 50 > (select length from syscolumns sc inner join sysobjects so
        on sc.[id] = so.[id] and so.[name] = 'ut_ZeitTerminalPosten' and sc.[name] = 'Comment')
BEGIN
  ALTER TABLE [dbo].[ut_ZeitTerminalPosten] ALTER COLUMN [Comment] char(50)
END
GO
IF 40 > (select length from syscolumns sc inner join sysobjects so
        on sc.[id] = so.[id] and so.[name] = 'ut_ZeitTerminalPosten' and sc.[name] = 'TicketGuid')
BEGIN
  ALTER TABLE [dbo].[ut_ZeitTerminalPosten] ALTER COLUMN [TicketGuid] char(40)
END
GO
IF 40 > (select length from syscolumns sc inner join sysobjects so
        on sc.[id] = so.[id] and so.[name] = 'ut_ZeitTerminalPosten' and sc.[name] = 'ClosedBy')
BEGIN
  ALTER TABLE [dbo].[ut_ZeitTerminalPosten] ALTER COLUMN [ClosedBy] char(40)
END
GO
IF 5 > (select length from syscolumns sc inner join sysobjects so
        on sc.[id] = so.[id] and so.[name] = 'ut_ZeitTerminalPosten' and sc.[name] = 'InsertTime')
BEGIN
  ALTER TABLE [dbo].[ut_ZeitTerminalPosten] ALTER COLUMN [InsertTime] char(5)
END
GO
IF 0 < (SELECT count(*) from [sysobjects] where [xtype] = 'V' and [name] = 'ZeitTerminalPosten')
  DROP VIEW [dbo].[ZeitTerminalPosten]
GO
CREATE VIEW [dbo].[ZeitTerminalPosten] AS
  SELECT * FROM [dbo].[ut_ZeitTerminalPosten]
GO
CREATE TABLE [dbo].[ut_ZeitTerminalPosten_Keys]
(
   [DataRecId]  integer NOT NULL
  ,[DataMandId] integer DEFAULT 1
  ,[Key00_Value] CHAR(50) NOT NULL
  ,[Key01_Value] CHAR(18) NOT NULL
  ,[Key02_Value] CHAR(70) NOT NULL
  ,[Key03_Value] CHAR(73) NOT NULL
  CONSTRAINT [Pk_ut_ZeitTerminalPosten_Keys]  PRIMARY KEY NONCLUSTERED ( [DataRecId] )
)
GO
CREATE TRIGGER [dbo].[tr_ZeitTerminalPosten_KeyDel] ON [dbo].[ut_ZeitTerminalPosten]
FOR DELETE
AS
  SET NOCOUNT ON
  DELETE FROM [dbo].[ut_ZeitTerminalPosten_Keys] WITH (SERIALIZABLE)
  WHERE [DataRecId] IN (SELECT [RecId] FROM DELETED)
GO

CREATE TRIGGER [dbo].[tr_ZeitTerminalPosten_KeyUpd] ON [dbo].[ut_ZeitTerminalPosten]
FOR INSERT, UPDATE
AS
  SET NOCOUNT ON
  IF UPDATE([RecId]) OR UPDATE([MandId])
  BEGIN
    DELETE FROM [dbo].[ut_ZeitTerminalPosten_Keys] WITH (SERIALIZABLE)
    WHERE [DataRecId] IN (SELECT [RecId] FROM DELETED)

    INSERT INTO [dbo].[ut_ZeitTerminalPosten_Keys] WITH (SERIALIZABLE)
    ([DataRecId],[DataMandId],[Key00_Value],[Key01_Value],[Key02_Value],[Key03_Value])
    (SELECT [RecId],[MandId]
     ,UPPER(convert(char(40),[PostenGuid])+STR(RecId,10))
     ,UPPER(STR([LfdNr],8,0)+STR(RecId,10))
     ,UPPER(convert(char(20),[Knr])+convert(char(40),[PostenGuid])+STR(RecId,10))
     ,UPPER(convert(char(20),[Knr])+convert(char(20),[Annr])+CONVERT(char(10),[Datum],120)+convert(char(5),[Uhrzeit])+STR([LfdNr],8,0)+STR(RecId,10))

    FROM INSERTED)
  END
  ELSE
  BEGIN
    UPDATE [dbo].[ut_ZeitTerminalPosten_Keys] WITH (SERIALIZABLE) SET
    [Key00_Value] = UPPER(convert(char(40),[PostenGuid])+STR([RecId],10))
   ,[Key01_Value] = UPPER(STR([LfdNr],8,0)+STR([RecId],10))
   ,[Key02_Value] = UPPER(convert(char(20),[Knr])+convert(char(40),[PostenGuid])+STR([RecId],10))
   ,[Key03_Value] = UPPER(convert(char(20),[Knr])+convert(char(20),[Annr])+CONVERT(char(10),[Datum],120)+convert(char(5),[Uhrzeit])+STR([LfdNr],8,0)+STR([RecId],10))
    FROM INSERTED WHERE [DataRecId] = [RecId]
  END
GO

UPDATE [dbo].[ut_ZeitTerminalPosten] SET RecId = RecId
GO


------------------------------------------------------------
IF 0 < (SELECT count(*) from [sysobjects] where [xtype] = 'P'   and [name] = 'up_Add_ZeitTerminalPosten')
  DROP PROCEDURE [dbo].[up_Add_ZeitTerminalPosten]
GO
CREATE PROCEDURE [dbo].[up_Add_ZeitTerminalPosten] AS
  DECLARE @NeueId integer
  SET @NeueId = (SELECT MAX(RecId) from [dbo].[ut_ZeitTerminalPosten])
  IF @NeueId IS NULL SET @NeueId = 0
  SET @NeueId = @NeueId + 1
  INSERT INTO [dbo].[ut_ZeitTerminalPosten] (RecId) VALUES( @NeueId )
  IF @@ERROR = 0
  BEGIN
    SELECT @NeueId AS RecId
    RETURN
  END
  SELECT 0 AS RecId
GO

------------------------------------------------------------
IF 0 < (SELECT count(*) from [sysobjects] where [xtype] = 'P'   and [name] = 'up_Upd_ZeitTerminalPosten')
  DROP PROCEDURE [dbo].[up_Upd_ZeitTerminalPosten]
GO
CREATE PROCEDURE [dbo].[up_Upd_ZeitTerminalPosten]
  @RI integer
 ,@Parm_PostenGuid char(40)
 ,@Parm_LfdNr integer
 ,@Parm_Knr char(20)
 ,@Parm_Uid char(30)
 ,@Parm_Datum datetime
 ,@Parm_Uhrzeit char(5)
 ,@Parm_Annr char(20)
 ,@Parm_Belegnr char(20)
 ,@Parm_StatusNum integer
 ,@Parm_StatusText char(10)
 ,@Parm_Comment char(50)
 ,@Parm_TicketGuid char(40)
 ,@Parm_Vkz integer
 ,@Parm_Closed tinyint
 ,@Parm_ClosedBy char(40)
 ,@Parm_InsertDate datetime
 ,@Parm_InsertTime char(5)
 ,@Parm_Minuten integer
 ,@Parm_ErrorCode integer
AS
--BEGIN TRANSACTION
UPDATE [dbo].[ut_ZeitTerminalPosten] SET
     [PostenGuid] = RTRIM(@Parm_PostenGuid)
    ,[LfdNr] = @Parm_LfdNr
    ,[Knr] = RTRIM(@Parm_Knr)
    ,[Uid] = RTRIM(@Parm_Uid)
    ,[Datum] = @Parm_Datum
    ,[Uhrzeit] = RTRIM(@Parm_Uhrzeit)
    ,[Annr] = RTRIM(@Parm_Annr)
    ,[Belegnr] = RTRIM(@Parm_Belegnr)
    ,[StatusNum] = @Parm_StatusNum
    ,[StatusText] = RTRIM(@Parm_StatusText)
    ,[Comment] = RTRIM(@Parm_Comment)
    ,[TicketGuid] = RTRIM(@Parm_TicketGuid)
    ,[Vkz] = @Parm_Vkz
    ,[Closed] = @Parm_Closed
    ,[ClosedBy] = RTRIM(@Parm_ClosedBy)
    ,[InsertDate] = @Parm_InsertDate
    ,[InsertTime] = RTRIM(@Parm_InsertTime)
    ,[Minuten] = @Parm_Minuten
    ,[ErrorCode] = @Parm_ErrorCode
  WHERE RecId = @RI
--COMMIT TRANSACTION
GO

------------------------------------------------------------
IF 0 < (SELECT count(*) from [sysobjects] where [xtype] = 'P'   and [name] = 'up_Sel_ZeitTerminalPosten')
  DROP PROCEDURE [dbo].[up_Sel_ZeitTerminalPosten]
GO
CREATE PROCEDURE [dbo].[up_Sel_ZeitTerminalPosten]
  @RI integer
AS
SELECT
     [PostenGuid]
    ,[LfdNr]
    ,[Knr]
    ,[Uid]
    ,[Datum]
    ,[Uhrzeit]
    ,[Annr]
    ,[Belegnr]
    ,[StatusNum]
    ,[StatusText]
    ,[Comment]
    ,[TicketGuid]
    ,[Vkz]
    ,[Closed]
    ,[ClosedBy]
    ,[InsertDate]
    ,[InsertTime]
    ,[Minuten]
    ,[ErrorCode]
  FROM [dbo].[ut_ZeitTerminalPosten]
  WHERE RecId = @RI
GO
------------------------------------------------------------
IF 0 < (SELECT count(*) from [sysobjects] where [xtype] = 'P'   and [name] = 'up_Del_ZeitTerminalPosten')
  DROP PROCEDURE [dbo].[up_Del_ZeitTerminalPosten]
GO
CREATE PROCEDURE [dbo].[up_Del_ZeitTerminalPosten]
  @RI integer
AS
  DELETE FROM [dbo].[ut_ZeitTerminalPosten] WHERE RecId = @RI
GO
------------------------------------------------------------
IF 0 < (SELECT count(*) from [sysobjects] where [xtype] = 'P'   and [name] = 'up_Reorg_ZeitTerminalPosten')
  DROP PROCEDURE [dbo].[up_Reorg_ZeitTerminalPosten]
GO
CREATE PROCEDURE [dbo].[up_Reorg_ZeitTerminalPosten]
  @bDbcc integer,@bRecId integer
AS
  IF (@bRecId = 1)
  BEGIN
    DECLARE  C        CURSOR FOR SELECT RecId FROM [dbo].[ut_ZeitTerminalPosten] ORDER BY RecId
    DECLARE  @CurrId  integer
    DECLARE  @NextId  integer
    --BEGIN TRANSACTION
    OPEN C
    SET @NextId = 1
    FETCH NEXT FROM C INTO @CurrId
    WHILE (@@FETCH_STATUS = 0)
    BEGIN
      IF @CurrId <> @NextId
      UPDATE [dbo].[ut_ZeitTerminalPosten] SET RecId=@NextId WHERE CURRENT OF C
      SET @NextId = @NextId + 1
      FETCH NEXT FROM C INTO @CurrId
    END
    CLOSE C
    --COMMIT TRANSACTION
    DEALLOCATE C
  END

  IF (@bDbcc = 1)
  BEGIN
    DBCC DBREINDEX ( [ut_ZeitTerminalPosten] )
  END

GO

------------------------------------------------------------
IF 0 < (SELECT count(*) from [sysobjects] where [xtype] = 'P'   and [name] = 'up_Append_ZeitTerminalPosten')
  DROP PROCEDURE [dbo].[up_Append_ZeitTerminalPosten]
GO
CREATE PROCEDURE [dbo].[up_Append_ZeitTerminalPosten]
  @Parm_PostenGuid char(40)
 ,@Parm_LfdNr integer
 ,@Parm_Knr char(20)
 ,@Parm_Uid char(30)
 ,@Parm_Datum datetime
 ,@Parm_Uhrzeit char(5)
 ,@Parm_Annr char(20)
 ,@Parm_Belegnr char(20)
 ,@Parm_StatusNum integer
 ,@Parm_StatusText char(10)
 ,@Parm_Comment char(50)
 ,@Parm_TicketGuid char(40)
 ,@Parm_Vkz integer
 ,@Parm_Closed tinyint
 ,@Parm_ClosedBy char(40)
 ,@Parm_InsertDate datetime
 ,@Parm_InsertTime char(5)
 ,@Parm_Minuten integer
 ,@Parm_ErrorCode integer
AS
  DECLARE @NeueId    integer
  SET     @NeueId = (SELECT MAX(RecId) FROM [dbo].[ut_ZeitTerminalPosten])
  IF @NeueId IS NULL SET @NeueId = 0
  SET @NeueId = @NeueId + 1
  INSERT INTO [dbo].[ut_ZeitTerminalPosten] (
    RecId
   ,[PostenGuid]
   ,[LfdNr]
   ,[Knr]
   ,[Uid]
   ,[Datum]
   ,[Uhrzeit]
   ,[Annr]
   ,[Belegnr]
   ,[StatusNum]
   ,[StatusText]
   ,[Comment]
   ,[TicketGuid]
   ,[Vkz]
   ,[Closed]
   ,[ClosedBy]
   ,[InsertDate]
   ,[InsertTime]
   ,[Minuten]
   ,[ErrorCode]
     ) VALUES (
    @NeueId
   ,RTRIM(@Parm_PostenGuid)
   ,@Parm_LfdNr
   ,RTRIM(@Parm_Knr)
   ,RTRIM(@Parm_Uid)
   ,@Parm_Datum
   ,RTRIM(@Parm_Uhrzeit)
   ,RTRIM(@Parm_Annr)
   ,RTRIM(@Parm_Belegnr)
   ,@Parm_StatusNum
   ,RTRIM(@Parm_StatusText)
   ,RTRIM(@Parm_Comment)
   ,RTRIM(@Parm_TicketGuid)
   ,@Parm_Vkz
   ,@Parm_Closed
   ,RTRIM(@Parm_ClosedBy)
   ,@Parm_InsertDate
   ,RTRIM(@Parm_InsertTime)
   ,@Parm_Minuten
   ,@Parm_ErrorCode
       )
  IF @@ERROR = 0
  BEGIN
    SELECT @NeueId AS RecId
    RETURN
  END
  SELECT 0 AS RecId
GO

------------------------------------------------------------
IF 0 < (SELECT count(*) from [sysobjects] where [xtype] = 'P'   and [name] = 'up_TrSel_ZeitTerminalPosten')
  DROP PROCEDURE [dbo].[up_TrSel_ZeitTerminalPosten]
GO
CREATE PROCEDURE [dbo].[up_TrSel_ZeitTerminalPosten]
AS
  SELECT   RecId,
      LTRIM(RTRIM([PostenGuid]))
      +LTRIM(RTRIM([Knr]))
      +LTRIM(RTRIM([Uid]))
      +LTRIM(RTRIM([Uhrzeit]))
      +LTRIM(RTRIM([Annr]))
      +LTRIM(RTRIM([Belegnr]))
      +LTRIM(RTRIM([StatusText]))
      +LTRIM(RTRIM([Comment]))
      +LTRIM(RTRIM([TicketGuid]))
      +LTRIM(RTRIM([ClosedBy]))
      +LTRIM(RTRIM([InsertTime]))
    AS Data
  FROM     [dbo].[ut_ZeitTerminalPosten]
  WHERE    RecId > 0
  ORDER BY RecId
GO

CREATE INDEX [Ik_Key00] ON [dbo].[ut_ZeitTerminalPosten_Keys]
( [Key00_Value],[DataRecId] )
GO
IF 0 < (SELECT count(*) from [sysobjects] where [xtype] = 'P'   and [name] = 'up_First_ZeitTerminalPosten_Key00')
  DROP PROCEDURE [dbo].[up_First_ZeitTerminalPosten_Key00]
GO
IF 0 < (SELECT count(*) from [sysobjects] where [xtype] = 'P'   and [name] = 'up_Last_ZeitTerminalPosten_Key00')
  DROP PROCEDURE [dbo].[up_Last_ZeitTerminalPosten_Key00]
GO
IF 0 < (SELECT count(*) from [sysobjects] where [xtype] = 'P'   and [name] = 'up_Prior_ZeitTerminalPosten_Key00')
  DROP PROCEDURE [dbo].[up_Prior_ZeitTerminalPosten_Key00]
GO
IF 0 < (SELECT count(*) from [sysobjects] where [xtype] = 'P'   and [name] = 'up_Next_ZeitTerminalPosten_Key00')
  DROP PROCEDURE [dbo].[up_Next_ZeitTerminalPosten_Key00]
GO
IF 0 < (SELECT count(*) from [sysobjects] where [xtype] = 'P'   and [name] = 'up_Prior50_ZeitTerminalPosten_Key00')
  DROP PROCEDURE [dbo].[up_Prior50_ZeitTerminalPosten_Key00]
GO
IF 0 < (SELECT count(*) from [sysobjects] where [xtype] = 'P'   and [name] = 'up_Next50_ZeitTerminalPosten_Key00')
  DROP PROCEDURE [dbo].[up_Next50_ZeitTerminalPosten_Key00]
GO
IF 0 < (SELECT count(*) from [sysobjects] where [xtype] = 'P'   and [name] = 'up_FindL_ZeitTerminalPosten_Key00')
  DROP PROCEDURE [dbo].[up_FindL_ZeitTerminalPosten_Key00]
GO
IF 0 < (SELECT count(*) from [sysobjects] where [xtype] = 'P'   and [name] = 'up_FindF_ZeitTerminalPosten_Key00')
  DROP PROCEDURE [dbo].[up_FindF_ZeitTerminalPosten_Key00]
GO

CREATE PROCEDURE [dbo].[up_First_ZeitTerminalPosten_Key00]
AS
  SELECT TOP 1 [DataRecId] FROM [dbo].[ut_ZeitTerminalPosten_Keys] ORDER BY [Key00_Value]
GO

CREATE PROCEDURE [dbo].[up_Last_ZeitTerminalPosten_Key00]
AS
  SELECT TOP 1 [DataRecId] FROM [dbo].[ut_ZeitTerminalPosten_Keys] ORDER BY [Key00_Value] DESC
GO

CREATE PROCEDURE [dbo].[up_Next_ZeitTerminalPosten_Key00] @mRecNo integer
AS
  SELECT TOP 1 [DataRecId] FROM [dbo].[ut_ZeitTerminalPosten_Keys]
  WHERE [Key00_Value] > (SELECT [Key00_Value] FROM [dbo].[ut_ZeitTerminalPosten_Keys] WHERE [DataRecId] = @mRecNo)
  ORDER BY [Key00_Value]
GO

CREATE PROCEDURE [dbo].[up_Prior_ZeitTerminalPosten_Key00] @mRecNo integer
AS
  SELECT TOP 1 [DataRecId] FROM [dbo].[ut_ZeitTerminalPosten_Keys]
  WHERE [Key00_Value] < (SELECT [Key00_Value] FROM [dbo].[ut_ZeitTerminalPosten_Keys] WHERE [DataRecId] = @mRecNo)
  ORDER BY [Key00_Value] DESC
GO

CREATE PROCEDURE [dbo].[up_Next50_ZeitTerminalPosten_Key00] @mRecNo integer
AS
  SELECT TOP 50 [DataRecId] FROM [dbo].[ut_ZeitTerminalPosten_Keys]
  WHERE [Key00_Value] > (SELECT [Key00_Value] FROM [dbo].[ut_ZeitTerminalPosten_Keys] WHERE [DataRecId] = @mRecNo)
  ORDER BY [Key00_Value]
GO

CREATE PROCEDURE [dbo].[up_Prior50_ZeitTerminalPosten_Key00] @mRecNo integer
AS
  SELECT TOP 50 [DataRecId] FROM [dbo].[ut_ZeitTerminalPosten_Keys]
  WHERE [Key00_Value] < (SELECT [Key00_Value] FROM [dbo].[ut_ZeitTerminalPosten_Keys] WHERE [DataRecId] = @mRecNo)
  ORDER BY [Key00_Value] DESC
GO

CREATE PROCEDURE [dbo].[up_FindF_ZeitTerminalPosten_Key00] @xKey char(128),@xLen integer
AS
  SELECT a.[DataRecId] FROM
    ( SELECT TOP 1 [DataRecId],[Key00_Value] AS Key_Value FROM [dbo].[ut_ZeitTerminalPosten_Keys]
      WHERE [Key00_Value] >= SUBSTRING(@xKey,1,@xLen)
      ORDER BY [Key00_Value]
    ) a
  WHERE a.Key_Value like SUBSTRING(@xKey,1,@xLen)+'%'
GO

CREATE PROCEDURE [dbo].[up_FindL_ZeitTerminalPosten_Key00] @xKey char(128),@xLen integer
AS
  SELECT TOP 1 [DataRecId] FROM [dbo].[ut_ZeitTerminalPosten_Keys]
  WHERE [Key00_Value] like SUBSTRING(@xKey,1,@xLen)+'%'
  ORDER BY [Key00_Value] DESC
GO

CREATE INDEX [Ik_Key01] ON [dbo].[ut_ZeitTerminalPosten_Keys]
( [Key01_Value],[DataRecId] )
GO
IF 0 < (SELECT count(*) from [sysobjects] where [xtype] = 'P'   and [name] = 'up_First_ZeitTerminalPosten_Key01')
  DROP PROCEDURE [dbo].[up_First_ZeitTerminalPosten_Key01]
GO
IF 0 < (SELECT count(*) from [sysobjects] where [xtype] = 'P'   and [name] = 'up_Last_ZeitTerminalPosten_Key01')
  DROP PROCEDURE [dbo].[up_Last_ZeitTerminalPosten_Key01]
GO
IF 0 < (SELECT count(*) from [sysobjects] where [xtype] = 'P'   and [name] = 'up_Prior_ZeitTerminalPosten_Key01')
  DROP PROCEDURE [dbo].[up_Prior_ZeitTerminalPosten_Key01]
GO
IF 0 < (SELECT count(*) from [sysobjects] where [xtype] = 'P'   and [name] = 'up_Next_ZeitTerminalPosten_Key01')
  DROP PROCEDURE [dbo].[up_Next_ZeitTerminalPosten_Key01]
GO
IF 0 < (SELECT count(*) from [sysobjects] where [xtype] = 'P'   and [name] = 'up_Prior50_ZeitTerminalPosten_Key01')
  DROP PROCEDURE [dbo].[up_Prior50_ZeitTerminalPosten_Key01]
GO
IF 0 < (SELECT count(*) from [sysobjects] where [xtype] = 'P'   and [name] = 'up_Next50_ZeitTerminalPosten_Key01')
  DROP PROCEDURE [dbo].[up_Next50_ZeitTerminalPosten_Key01]
GO
IF 0 < (SELECT count(*) from [sysobjects] where [xtype] = 'P'   and [name] = 'up_FindL_ZeitTerminalPosten_Key01')
  DROP PROCEDURE [dbo].[up_FindL_ZeitTerminalPosten_Key01]
GO
IF 0 < (SELECT count(*) from [sysobjects] where [xtype] = 'P'   and [name] = 'up_FindF_ZeitTerminalPosten_Key01')
  DROP PROCEDURE [dbo].[up_FindF_ZeitTerminalPosten_Key01]
GO

CREATE PROCEDURE [dbo].[up_First_ZeitTerminalPosten_Key01]
AS
  SELECT TOP 1 [DataRecId] FROM [dbo].[ut_ZeitTerminalPosten_Keys] ORDER BY [Key01_Value]
GO

CREATE PROCEDURE [dbo].[up_Last_ZeitTerminalPosten_Key01]
AS
  SELECT TOP 1 [DataRecId] FROM [dbo].[ut_ZeitTerminalPosten_Keys] ORDER BY [Key01_Value] DESC
GO

CREATE PROCEDURE [dbo].[up_Next_ZeitTerminalPosten_Key01] @mRecNo integer
AS
  SELECT TOP 1 [DataRecId] FROM [dbo].[ut_ZeitTerminalPosten_Keys]
  WHERE [Key01_Value] > (SELECT [Key01_Value] FROM [dbo].[ut_ZeitTerminalPosten_Keys] WHERE [DataRecId] = @mRecNo)
  ORDER BY [Key01_Value]
GO

CREATE PROCEDURE [dbo].[up_Prior_ZeitTerminalPosten_Key01] @mRecNo integer
AS
  SELECT TOP 1 [DataRecId] FROM [dbo].[ut_ZeitTerminalPosten_Keys]
  WHERE [Key01_Value] < (SELECT [Key01_Value] FROM [dbo].[ut_ZeitTerminalPosten_Keys] WHERE [DataRecId] = @mRecNo)
  ORDER BY [Key01_Value] DESC
GO

CREATE PROCEDURE [dbo].[up_Next50_ZeitTerminalPosten_Key01] @mRecNo integer
AS
  SELECT TOP 50 [DataRecId] FROM [dbo].[ut_ZeitTerminalPosten_Keys]
  WHERE [Key01_Value] > (SELECT [Key01_Value] FROM [dbo].[ut_ZeitTerminalPosten_Keys] WHERE [DataRecId] = @mRecNo)
  ORDER BY [Key01_Value]
GO

CREATE PROCEDURE [dbo].[up_Prior50_ZeitTerminalPosten_Key01] @mRecNo integer
AS
  SELECT TOP 50 [DataRecId] FROM [dbo].[ut_ZeitTerminalPosten_Keys]
  WHERE [Key01_Value] < (SELECT [Key01_Value] FROM [dbo].[ut_ZeitTerminalPosten_Keys] WHERE [DataRecId] = @mRecNo)
  ORDER BY [Key01_Value] DESC
GO

CREATE PROCEDURE [dbo].[up_FindF_ZeitTerminalPosten_Key01] @xKey char(128),@xLen integer
AS
  SELECT a.[DataRecId] FROM
    ( SELECT TOP 1 [DataRecId],[Key01_Value] AS Key_Value FROM [dbo].[ut_ZeitTerminalPosten_Keys]
      WHERE [Key01_Value] >= SUBSTRING(@xKey,1,@xLen)
      ORDER BY [Key01_Value]
    ) a
  WHERE a.Key_Value like SUBSTRING(@xKey,1,@xLen)+'%'
GO

CREATE PROCEDURE [dbo].[up_FindL_ZeitTerminalPosten_Key01] @xKey char(128),@xLen integer
AS
  SELECT TOP 1 [DataRecId] FROM [dbo].[ut_ZeitTerminalPosten_Keys]
  WHERE [Key01_Value] like SUBSTRING(@xKey,1,@xLen)+'%'
  ORDER BY [Key01_Value] DESC
GO

CREATE INDEX [Ik_Key02] ON [dbo].[ut_ZeitTerminalPosten_Keys]
( [Key02_Value],[DataRecId] )
GO
IF 0 < (SELECT count(*) from [sysobjects] where [xtype] = 'P'   and [name] = 'up_First_ZeitTerminalPosten_Key02')
  DROP PROCEDURE [dbo].[up_First_ZeitTerminalPosten_Key02]
GO
IF 0 < (SELECT count(*) from [sysobjects] where [xtype] = 'P'   and [name] = 'up_Last_ZeitTerminalPosten_Key02')
  DROP PROCEDURE [dbo].[up_Last_ZeitTerminalPosten_Key02]
GO
IF 0 < (SELECT count(*) from [sysobjects] where [xtype] = 'P'   and [name] = 'up_Prior_ZeitTerminalPosten_Key02')
  DROP PROCEDURE [dbo].[up_Prior_ZeitTerminalPosten_Key02]
GO
IF 0 < (SELECT count(*) from [sysobjects] where [xtype] = 'P'   and [name] = 'up_Next_ZeitTerminalPosten_Key02')
  DROP PROCEDURE [dbo].[up_Next_ZeitTerminalPosten_Key02]
GO
IF 0 < (SELECT count(*) from [sysobjects] where [xtype] = 'P'   and [name] = 'up_Prior50_ZeitTerminalPosten_Key02')
  DROP PROCEDURE [dbo].[up_Prior50_ZeitTerminalPosten_Key02]
GO
IF 0 < (SELECT count(*) from [sysobjects] where [xtype] = 'P'   and [name] = 'up_Next50_ZeitTerminalPosten_Key02')
  DROP PROCEDURE [dbo].[up_Next50_ZeitTerminalPosten_Key02]
GO
IF 0 < (SELECT count(*) from [sysobjects] where [xtype] = 'P'   and [name] = 'up_FindL_ZeitTerminalPosten_Key02')
  DROP PROCEDURE [dbo].[up_FindL_ZeitTerminalPosten_Key02]
GO
IF 0 < (SELECT count(*) from [sysobjects] where [xtype] = 'P'   and [name] = 'up_FindF_ZeitTerminalPosten_Key02')
  DROP PROCEDURE [dbo].[up_FindF_ZeitTerminalPosten_Key02]
GO

CREATE PROCEDURE [dbo].[up_First_ZeitTerminalPosten_Key02]
AS
  SELECT TOP 1 [DataRecId] FROM [dbo].[ut_ZeitTerminalPosten_Keys] ORDER BY [Key02_Value]
GO

CREATE PROCEDURE [dbo].[up_Last_ZeitTerminalPosten_Key02]
AS
  SELECT TOP 1 [DataRecId] FROM [dbo].[ut_ZeitTerminalPosten_Keys] ORDER BY [Key02_Value] DESC
GO

CREATE PROCEDURE [dbo].[up_Next_ZeitTerminalPosten_Key02] @mRecNo integer
AS
  SELECT TOP 1 [DataRecId] FROM [dbo].[ut_ZeitTerminalPosten_Keys]
  WHERE [Key02_Value] > (SELECT [Key02_Value] FROM [dbo].[ut_ZeitTerminalPosten_Keys] WHERE [DataRecId] = @mRecNo)
  ORDER BY [Key02_Value]
GO

CREATE PROCEDURE [dbo].[up_Prior_ZeitTerminalPosten_Key02] @mRecNo integer
AS
  SELECT TOP 1 [DataRecId] FROM [dbo].[ut_ZeitTerminalPosten_Keys]
  WHERE [Key02_Value] < (SELECT [Key02_Value] FROM [dbo].[ut_ZeitTerminalPosten_Keys] WHERE [DataRecId] = @mRecNo)
  ORDER BY [Key02_Value] DESC
GO

CREATE PROCEDURE [dbo].[up_Next50_ZeitTerminalPosten_Key02] @mRecNo integer
AS
  SELECT TOP 50 [DataRecId] FROM [dbo].[ut_ZeitTerminalPosten_Keys]
  WHERE [Key02_Value] > (SELECT [Key02_Value] FROM [dbo].[ut_ZeitTerminalPosten_Keys] WHERE [DataRecId] = @mRecNo)
  ORDER BY [Key02_Value]
GO

CREATE PROCEDURE [dbo].[up_Prior50_ZeitTerminalPosten_Key02] @mRecNo integer
AS
  SELECT TOP 50 [DataRecId] FROM [dbo].[ut_ZeitTerminalPosten_Keys]
  WHERE [Key02_Value] < (SELECT [Key02_Value] FROM [dbo].[ut_ZeitTerminalPosten_Keys] WHERE [DataRecId] = @mRecNo)
  ORDER BY [Key02_Value] DESC
GO

CREATE PROCEDURE [dbo].[up_FindF_ZeitTerminalPosten_Key02] @xKey char(128),@xLen integer
AS
  SELECT a.[DataRecId] FROM
    ( SELECT TOP 1 [DataRecId],[Key02_Value] AS Key_Value FROM [dbo].[ut_ZeitTerminalPosten_Keys]
      WHERE [Key02_Value] >= SUBSTRING(@xKey,1,@xLen)
      ORDER BY [Key02_Value]
    ) a
  WHERE a.Key_Value like SUBSTRING(@xKey,1,@xLen)+'%'
GO

CREATE PROCEDURE [dbo].[up_FindL_ZeitTerminalPosten_Key02] @xKey char(128),@xLen integer
AS
  SELECT TOP 1 [DataRecId] FROM [dbo].[ut_ZeitTerminalPosten_Keys]
  WHERE [Key02_Value] like SUBSTRING(@xKey,1,@xLen)+'%'
  ORDER BY [Key02_Value] DESC
GO

CREATE INDEX [Ik_Key03] ON [dbo].[ut_ZeitTerminalPosten_Keys]
( [Key03_Value],[DataRecId] )
GO
IF 0 < (SELECT count(*) from [sysobjects] where [xtype] = 'P'   and [name] = 'up_First_ZeitTerminalPosten_Key03')
  DROP PROCEDURE [dbo].[up_First_ZeitTerminalPosten_Key03]
GO
IF 0 < (SELECT count(*) from [sysobjects] where [xtype] = 'P'   and [name] = 'up_Last_ZeitTerminalPosten_Key03')
  DROP PROCEDURE [dbo].[up_Last_ZeitTerminalPosten_Key03]
GO
IF 0 < (SELECT count(*) from [sysobjects] where [xtype] = 'P'   and [name] = 'up_Prior_ZeitTerminalPosten_Key03')
  DROP PROCEDURE [dbo].[up_Prior_ZeitTerminalPosten_Key03]
GO
IF 0 < (SELECT count(*) from [sysobjects] where [xtype] = 'P'   and [name] = 'up_Next_ZeitTerminalPosten_Key03')
  DROP PROCEDURE [dbo].[up_Next_ZeitTerminalPosten_Key03]
GO
IF 0 < (SELECT count(*) from [sysobjects] where [xtype] = 'P'   and [name] = 'up_Prior50_ZeitTerminalPosten_Key03')
  DROP PROCEDURE [dbo].[up_Prior50_ZeitTerminalPosten_Key03]
GO
IF 0 < (SELECT count(*) from [sysobjects] where [xtype] = 'P'   and [name] = 'up_Next50_ZeitTerminalPosten_Key03')
  DROP PROCEDURE [dbo].[up_Next50_ZeitTerminalPosten_Key03]
GO
IF 0 < (SELECT count(*) from [sysobjects] where [xtype] = 'P'   and [name] = 'up_FindL_ZeitTerminalPosten_Key03')
  DROP PROCEDURE [dbo].[up_FindL_ZeitTerminalPosten_Key03]
GO
IF 0 < (SELECT count(*) from [sysobjects] where [xtype] = 'P'   and [name] = 'up_FindF_ZeitTerminalPosten_Key03')
  DROP PROCEDURE [dbo].[up_FindF_ZeitTerminalPosten_Key03]
GO

CREATE PROCEDURE [dbo].[up_First_ZeitTerminalPosten_Key03]
AS
  SELECT TOP 1 [DataRecId] FROM [dbo].[ut_ZeitTerminalPosten_Keys] ORDER BY [Key03_Value]
GO

CREATE PROCEDURE [dbo].[up_Last_ZeitTerminalPosten_Key03]
AS
  SELECT TOP 1 [DataRecId] FROM [dbo].[ut_ZeitTerminalPosten_Keys] ORDER BY [Key03_Value] DESC
GO

CREATE PROCEDURE [dbo].[up_Next_ZeitTerminalPosten_Key03] @mRecNo integer
AS
  SELECT TOP 1 [DataRecId] FROM [dbo].[ut_ZeitTerminalPosten_Keys]
  WHERE [Key03_Value] > (SELECT [Key03_Value] FROM [dbo].[ut_ZeitTerminalPosten_Keys] WHERE [DataRecId] = @mRecNo)
  ORDER BY [Key03_Value]
GO

CREATE PROCEDURE [dbo].[up_Prior_ZeitTerminalPosten_Key03] @mRecNo integer
AS
  SELECT TOP 1 [DataRecId] FROM [dbo].[ut_ZeitTerminalPosten_Keys]
  WHERE [Key03_Value] < (SELECT [Key03_Value] FROM [dbo].[ut_ZeitTerminalPosten_Keys] WHERE [DataRecId] = @mRecNo)
  ORDER BY [Key03_Value] DESC
GO

CREATE PROCEDURE [dbo].[up_Next50_ZeitTerminalPosten_Key03] @mRecNo integer
AS
  SELECT TOP 50 [DataRecId] FROM [dbo].[ut_ZeitTerminalPosten_Keys]
  WHERE [Key03_Value] > (SELECT [Key03_Value] FROM [dbo].[ut_ZeitTerminalPosten_Keys] WHERE [DataRecId] = @mRecNo)
  ORDER BY [Key03_Value]
GO

CREATE PROCEDURE [dbo].[up_Prior50_ZeitTerminalPosten_Key03] @mRecNo integer
AS
  SELECT TOP 50 [DataRecId] FROM [dbo].[ut_ZeitTerminalPosten_Keys]
  WHERE [Key03_Value] < (SELECT [Key03_Value] FROM [dbo].[ut_ZeitTerminalPosten_Keys] WHERE [DataRecId] = @mRecNo)
  ORDER BY [Key03_Value] DESC
GO

CREATE PROCEDURE [dbo].[up_FindF_ZeitTerminalPosten_Key03] @xKey char(128),@xLen integer
AS
  SELECT a.[DataRecId] FROM
    ( SELECT TOP 1 [DataRecId],[Key03_Value] AS Key_Value FROM [dbo].[ut_ZeitTerminalPosten_Keys]
      WHERE [Key03_Value] >= SUBSTRING(@xKey,1,@xLen)
      ORDER BY [Key03_Value]
    ) a
  WHERE a.Key_Value like SUBSTRING(@xKey,1,@xLen)+'%'
GO

CREATE PROCEDURE [dbo].[up_FindL_ZeitTerminalPosten_Key03] @xKey char(128),@xLen integer
AS
  SELECT TOP 1 [DataRecId] FROM [dbo].[ut_ZeitTerminalPosten_Keys]
  WHERE [Key03_Value] like SUBSTRING(@xKey,1,@xLen)+'%'
  ORDER BY [Key03_Value] DESC
GO

