Re: Select into...
Posted in 1999
Topics: Server Administration
If you never let Informix name things ie index for you then
dbschema -d <dbname> -t <table> | sed 's/table/newtable/g' | dbaccess <dbname>
works OK, but it does rely on the fact you name things consistently:-))
Paul Watson
WF Software Ltd
Tel: +44 1436 674729
Fax: +44 1436 678729
www.wfsoftware.com/informix
# If you broke it, hide the evidence
>>> Curt Spinney <spinman1@bellsouth.net> 10/16/99 01:54PM >>>
This requires going outside isql/dbaccess & may take awhile depending on table
size but you won't have to type all the fields...
dbschema -d databasename -t oldtable tempfile.sql (from shell)edit tempfile.sql, change tablename from old to new (drop unnecessay indexes,
rename remaining)
run tempfile.sql
insert into newtable select * from oldtable;alter newtable drop fieldname;
select * from newtable
Curt
David Williams wrote:
> In article <7u36ac$dsf$1@autumn.news.rcn.net>, Mako Joe
> <eyeofthestorm2@hotmail.com> writes
> >I may be wrong, and I've never tried this on Informix, but I think in Oracle
> >you can do the following:
> >create table2 as select * from table1
> >
>
> select * from table1 into temp table2 with no log>
> This only works for temporary tables though.
>
> >Jeff wrote in message ...
> >>Hi,
> >>
> >>I am a MSSQL user trying to find the equivalent to a "Select into". What
> >>this does is create a table from another table without writing to a log
> >>file. Something like this...
> >>
> >>Select * into table1 from table2> >>
> >>Is there something like this in Informix?
> >>
> >>Thanks in advance,
> >>Jeff
> >
> >
> >
>
> --
> David Williams
**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.
www.mimesweeper.com
**********************************************************************