Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread Issue with Temporary Table
Thu, May 15 2014 5:39 PMPermanent Link

Kevin Koehne

I think I've found a bug with temporary tables. Basically, it appears that data is getting corrupted when inserting 2 constant strings with data from an existing table. Here's a the simplest example I could conjure up:
Create Temporary Table tmpData(
  ShortDesc varchar(50),
  LongDesc varchar(50)
)
!
Insert Into tmpData(ShortDesc, LongDesc)
        Select 'Short', 'Long'
from anyTable
!
Select * from tmpData

The attached image shows how ShortDesc is getting corrupted.

I found that if I concatenated data from the underlying table to one of the string constants the data would be correct. For instance:

Insert Into tmpData(ShortDesc, LongDesc)
        Select 'Short', 'Long' + Cast(ID as varchar(10))
from anyTable

It didn't seem to matter what anyTable was (at least any in my schema)

Here's a sample anyTable schema just in case:
CREATE TABLE "cfgconferencetypes"
(
"ID" INTEGER NOT NULL,
"Name" VARCHAR(255) COLLATE "ANSI_CI" NOT NULL,
"IsActive" BOOLEAN DEFAULT 1 NOT NULL,
"DisplayOrder" INTEGER NOT NULL,
CONSTRAINT "PRIMARY" PRIMARY KEY ("ID")
)

I'm using version 2.15 of the engine.



Attachments: Capture.PNG
Fri, May 16 2014 1:33 AMPermanent Link

Ralf Bieber

EDV Dienstleistungen Ralf Bieber

Kevin Koehne wrote:

Kevin

> I think I've found a bug with temporary tables. Basically, it appears
> that data is getting corrupted when inserting 2 constant strings with
> data from an existing table.
>
>
> I'm using version 2.15 of the engine.

Your code works correct with the ElevateDB Manager version 2.16 Build
2.

Ralf
Image