Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread Select into temporary table
Thu, Jan 3 2013 3:15 PMPermanent Link

Linda_web

Hello,

How you do select * into temporary table ABC from mytable
Then do select from new created temporary table
Select * from ABC where something = something
This is very simple in many databases, but I can’t find a way to do it with EDB

Thank you
Fri, Jan 11 2013 11:21 AMPermanent Link

Fernando Dias

Team Elevate Team Elevate

Linda,

It couldn't be easier:

  CREATE TEMPORARY TABLE Temp_Tbl(LIKE ABC) !
  INSERT INTO Temp_Tbl SELECT * FROM ABC WHERE <Condition> !

or if you are going to use it in a script ot stored procedure:

  EXECUTE IMMEDIATE
    'CREATE TEMPORARY TABLE Temp_Tbl(LIKE ABC)' ;
  EXECUTE IMMEDIATE
    'INSERT INTO Temp_Tbl SELECT * FROM ABC WHERE <Condition> ' ;

--
Fernando Dias
[Team Elevate]
Image