RE: Informix-SQL "compability"
Posted in 2006
> -----Original Message----- > From: informix-list-bounces@iiug.org [mailto:informix-list- > bounces@iiug.org] On Behalf Of Torsten Schmidt > Sent: Tuesday, May 02, 2006 7:53 AM > To: informix-list@iiug.org > Subject: Re: Informix-SQL "compability" > > Serge Rielau wrote: > > > Torsten Schmidt wrote: > >> > >> We are working actually on an migration-project from an > >> AdabasD-application to our IDS Workgroup Server(V10.0) on SuSE (dito > >> V10.0). > >> > >> For all things on the Database-repository we've written successfully > >> sed-Scripts, which migrate the database-schema from Adabas to Informix. > >> > >> The foreign company has unfortunately such SQL-statements inside their > >> application like: > >> > >> "CREATE TABLE copied_struct LIKE template_tab;" > >> The Informix-SQL-Parser dislikes the "LIKE"-keyword, which results in > an > >> syntax error (code 201). We're missing such nice feature; is there any > >> possibility to solve this with some built-in function? > >> If not, I assume that we should write an SPL function... > > IDS can do this using SELECT INTO (use a 1=0 predicate to not copy data > > as needed) > > Yes, but it seems, that this only goes thru the SQL-Parser, if the target > table is temporary. For example: > "select * from detail where 1=0 into TEMP detail_neu ;" > And under the (sick) Adabas RDBMS the above statement "CREATE TABLE > copied_struct LIKE template_tab;" produces permanent tables! > I believe XPS supports this ("select x, y, z into standard..."), but IDS doesn't. It sure would be a neat feature, though. DC