RE: Creating new table with same structure as existing one
Posted in 2003
How about altering the table to fragment it, putting the yyyymm rows into a
separate fragment, and then detaching that fragment into the new table? The
effectiveness of this approach probably depends on how big the original
table is.
HTH,
Paul Mosser
-----Original Message-----
From: Nebojsa Sevo [mailto:DELETE_mips@zg.tel.hr]
Sent: Tuesday, October 14, 2003 2:59 AM
To: informix-list@iiug.org
Subject: Creating new table with same structure as existing one
I need to create "archive" table that will have the same structure as
"production" one.
When I run my program it have to create table named "pronop_yyyymm" ( yyyymm
is
argument to my program representing date in format year(4)month(2)) if it
doesn't exist. I will write rows from table "pronop" that are in given
month/year to "pronop_yyyymm" and delete them from "pronop" (I know that
DELETE
is very slow but I don't have alternative).
What I want is not to change program (or part of program where I create
"pronop_yyyymm") when structure of table "pronop" is changed.
I am using I4GL. I have an idea to do it with "dbschema" and some scripting.
Is there any other way?
nebojsa
------------------------------------
Remove spam block (DELETE_) to reply
sending to informix-list