Subject | Re: [firebird-support] NewBie : How to rewrite a select Into query in firebird |
---|---|
Author | Helen Borrie |
Post date | 2006-12-02T06:01:52Z |
At 03:59 PM 2/12/2006, you wrote:
You need to create the new table and then use the syntax
insert into TheNewTable (Field1, Field 2.....)
select aCompatible1, aCompatible2, ... from TheOldTable
Warning: if you have been used to using your original syntax in some
other dbms for the purpose of creating temporary tables, this is not
a healthy thing to do in Firebird. Rather, architect this concept as
"temporary sets" inserted into/retrieved from a persistent
table. You wd need to add a unique "Session ID" of some kind to
capture/identify/isolate the set for a specific context of user and connection.
./hb
>Hi AllCorrect.
>
>
>I have a query that is as follows
>
>select * into TempEmployeeMaster From EmployeeMaster
>
>
>Here TempEmployeeMaster is new table which should be created with this
>statement execution . Can anyone tell me how this query can be
>rewritten in firebird . Ofcourse i know that Fb dont support Select +
>and INTO statement for creating new tables.
You need to create the new table and then use the syntax
insert into TheNewTable (Field1, Field 2.....)
select aCompatible1, aCompatible2, ... from TheOldTable
Warning: if you have been used to using your original syntax in some
other dbms for the purpose of creating temporary tables, this is not
a healthy thing to do in Firebird. Rather, architect this concept as
"temporary sets" inserted into/retrieved from a persistent
table. You wd need to add a unique "Session ID" of some kind to
capture/identify/isolate the set for a specific context of user and connection.
./hb