Subject RE: [firebird-support] Create table from another table
Author Franky Brandt
First of all, this is not a Interbase 7.5 group, it’s a Firebird Group.



If i get it right you want a command that creates a table and then puts data
in that table from another ordered table?

That would be easy in a stored procedure.



1.Create table

2.Do a ordered For select on the existing table and for each record insert
the data into the new table



Franky



Van: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] Namens Alejandro Garcia
Verzonden: woensdag 28 maart 2007 18:13
Aan: firebird-support@yahoogroups.com
Onderwerp: Re: [firebird-support] Create table from another table



So? you create the table and then INSERT from a SELECT?
If I do that I can't insert it ordered because the insert does not allow the
ORDER BY in the INSERT

Nick Upson <nick.upson@... <mailto:nick.upson%40gmail.com> > escribió:
No it's not possible

On 28/03/07, Alejandro Garcia wrote:
> Is this the forum for simple/newbie SQL questions?
>
> Is it possible in InterBase 7.5 create a table from another table? I'm
reading the specification of the CREATE satatement but can't find how
> Like this:
>
> CREATE TABLE suppliers
> AS (SELECT companies.id, companies.address, categories.cat_type
> FROM companies, categories
> WHERE companies.id = categories.id
> AND companies.id > 1000);
>
>
>
> CREATE TABLE table [EXTERNAL [FILE] ' filespec']
> ( [, | …]);
> = col {< datatype> | COMPUTED [BY] (< expr>) | domain}
> [DEFAULT { literal | NULL | USER}]
> [NOT NULL]
> [ ]
> [COLLATE collation]

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Visit http://www.firebirdsql.org and click the Resources item
on the main (top) menu. Try Knowledgebase and FAQ links !

Also search the knowledgebases at http://www.ibphoenix.com

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Yahoo! Groups Links


---------------------------------

LLama Gratis a cualquier PC del Mundo.
Llamadas a fijos y móviles desde 1 céntimo por minuto.
http://es.voice.yahoo.com

[Non-text portions of this message have been removed]





[Non-text portions of this message have been removed]