select 1+3 from dual, from dummy, from ... ???
Posted in 1999
Topics: General Discussion
Hi, I should like to know how to reference a dummy table in Informix. In example: with Oracle I use the clause 'from dual', with Sybase 'from dummy' but with Informix I don't know how to do it. Can you help me ?. Thanks in advance.
Carlos Daniel Orden (cdo@linux0.unsl.edu.ar) wrote: : Hi, : I should like to know how to reference a dummy table in Informix. : In example: with Oracle I use the clause 'from dual', with Sybase 'from : dummy' but with Informix I don't know how to do it. Can you help me ?. : Thanks in advance. Carlos, You can do one of two things: Create a dummy table called dummy. Doesn't matter what the fields are. now do a "SELECT 1+3 from dummy;" or SELECT 1+3 from systables where tabid = 1 The where clause assures you that you'll only get one row returned. Joe -- --------------------------------------------------------------------------- Joe Lumbley(jlumbley@netcom.com) author of: "INFORMIX DBA Survival Guide" The DBA Survival Guide, Second Edition will cover NT, 7.X through 7.3, graphical utilities, more survival hints. Publish date: 12/16/98 FINALLY! ---------------------------------------------------------------------------
Can't resist - I assume that Sybase and Oracle do basic arithmetic without a Select statement then ??? H Carlos Daniel Orden wrote in message <78q5qf$osq$1@linux0.unsl.edu.ar>... >Hi, > I should like to know how to reference a dummy table in Informix. >In example: with Oracle I use the clause 'from dual', with Sybase 'from >dummy' but with Informix I don't know how to do it. Can you help me ?. >Thanks in advance. >
You could just create a table just like the Oracle dual table.
I have done this on MS SQL Server for the same purpose.
Here is the DDL for it right out of the Oracle MIGRATE.BSQ file.
create table dual (dummy char(1)) /* pl/sql's standard pckg requires dual*/
/
insert into dual values('X')/
Steve McAllister
Carlos Daniel Orden wrote in message <78q5qf$osq$1@linux0.unsl.edu.ar>...
>Hi,
> I should like to know how to reference a dummy table in Informix.
>In example: with Oracle I use the clause 'from dual', with Sybase 'from
>dummy' but with Informix I don't know how to do it. Can you help me ?.
>Thanks in advance.
>