Subject Re: [Firebird-Architect] Counter proposal to Temporary tables
Author Paulo Gaspar
Answer inline...

Dmitry Yemanov wrote:

>"Ann W. Harrison" <aharrison@...> wrote:
>I do hope this entire thread is not about the migration of MSSQL users ;-)

Personally, I am not migrating from SQLServer. Nice LTTs were not enough
to keep me from avoiding it.

>>Adding a non-standard temporary table
>>implementation will make future standards a choice between
>>doing the right thing - maintaining backward compatibility
>>and doing the right thing - following the standard.

Actually, there are a lot of ways to work arround such limitations when
you already know the standard.

>Sigh, we may offer created and declared SESSION TEMPORARY TABLE
instead. It
>will have the semantics of LTTs being discussed here. It will make the
>sponsor (and, expectedly, other guys as well) happy. Later we may either
>change this syntax to {SESSION | LOCAL} or implement yet another
>[standard-compliant] LOCAL TEMPORARY TABLE or forget about standard
LTTs for
>ever. But please don't stop a feature discussion just because we don't
>understand the SQL-99 LTTs.

Actually - since you mention declaration syntax - most of the usage I
did of LTTs in SQLServer was by creating them straight from some query.
It was something like:

(Keep in mind that this syntax must be incorrect since I do not remember
it anymore, but you can get the idea from it.)

After having the temporary table "xpto", you could perform massive
appends/updates/deletes on it and them put the resulting "already
cooked" data elsewhere or just return the resulting data set as the
result of a stored procedure. You could even use multiple temporary
tables, of course, and use interactions among them. It was especially
convenient for some really complex reports but also for some really
complex and massive data manipulations.

(To give you an idea of why I would have such big and complex data
manipulations, I can tell you I used Sybase SQL Server at a project for
"Telecel", now "Vodafone Portugal".)


Paulo Gaspar