I would like to use the SQL function for some manipulation but every
SQL needs a table. Therefore a dummy table with 1 row of record is
needed. For example, if I would to get the system date through SQL -
select today from <dummy table>
We can surely create the dummy table but I'm just wondering whether
Informix does have a special table for this purpose. In Oracle, there
is a table called dual for this purpose.
Any ideas?
Thanks in advance.
Generally I use (and I think most people do)
"SELECT TODAY FROM systables WHERE tabid = 1;"
AFAIK, Informix does not have dummy table like dual.
So you use the following SQL.
select xxx from systables where tabid=1;
Regards.
--
Tsutomu Ogiwara from Tokyo Japan.
ICQ#:168106592
>From: ehc...@hotmail.com (James)
>Reply-To: ehc...@hotmail.com (James)
>To: inform...@iiug.org
>Subject: Any Dummy Table In Informix?
>Date: 31 Oct 2002 23:05:29 -0800
>
>Hi,
>
>I would like to use the SQL function for some manipulation but every
>SQL needs a table. Therefore a dummy table with 1 row of record is
>needed. For example, if I would to get the system date through SQL -
>select today from <dummy table>
>
>We can surely create the dummy table but I'm just wondering whether
>Informix does have a special table for this purpose. In Oracle, there
>is a table called dual for this purpose.
>
>Any ideas?
>
>Thanks in advance.
_________________________________________________________________
Get faster connections -- switch to MSN Internet Access!
http://resourcecenter.msn.com/access/plans/default.asp
> Hi,
>
> I would like to use the SQL function for some manipulation but every
> SQL needs a table. Therefore a dummy table with 1 row of record is
> needed. For example, if I would to get the system date through SQL -
> select today from <dummy table>
>
> We can surely create the dummy table but I'm just wondering whether
> Informix does have a special table for this purpose. In Oracle, there
> is a table called dual for this purpose.
>
> Any ideas?
>
> Thanks in advance.
>
It is normally done with a system table, how about systables ?
Colin Bull
c.b...@VideoNetworks.com
CREATE VEW dual AS SELECT * FROM systables WHERE tabid=1
Then we could do SELECT TODAY FROM dual
Malcolm
-----Original Message-----
From: Obnoxio The Clown [mailto:obn...@hotmail.com]
Sent: 01 November 2002 08:03
To: inform...@iiug.org
Subject: Re: Any Dummy Table In Informix?
James wrote:
> Hi,
>
> I would like to use the SQL function for some manipulation but every
> SQL needs a table. Therefore a dummy table with 1 row of record is
> needed. For example, if I would to get the system date through SQL -
> select today from <dummy table>
>
> We can surely create the dummy table but I'm just wondering whether
> Informix does have a special table for this purpose. In Oracle, there
> is a table called dual for this purpose.
Generally I use (and I think most people do)
"SELECT TODAY FROM systables WHERE tabid = 1;"
DISCLAIMER
This message contains confidential information and is intended only for
the individual named. If you are not the named addressee you should not
disseminate, distribute or copy this e-mail. Please notify the sender
immediately by e-mail if you have received this e-mail by mistake and
delete this e-mail from your system. E-mail transmission cannot be
guaranteed to be secure or error-free as information could be
intercepted, corrupted, lost, destroyed, arrive late or incomplete, or
contain viruses. The sender therefore does not accept liability for any
errors or omissions in the contents of this message, which arise as a
result of e-mail transmission. If verification is required please
request a hard-copy version.
I use objected-relational properties of IDS
SELECT TODAY FROM TABLE(SET{1})
Pavel
"James" <ehc...@hotmail.com> píse v diskusním príspevku
news:46fb4b22.02103...@posting.google.com...
I use a real table:
CREATE TABLE dual (value INTEGER NOT NULL CHECK (value = 0) UNIQUE);
INSERT INTO dual VALUES(0);
REVOKE ALL ON dual FROM PUBLIC;
GRANT SELECT ON dual TO PUBLIC;
> "James" <ehc...@hotmail.com> wrote:
>>I would like to use the SQL function for some manipulation but every
>>SQL needs a table. Therefore a dummy table with 1 row of record is
>>needed. For example, if I would to get the system date through SQL -
>>select today from <dummy table>
>>
>>We can surely create the dummy table but I'm just wondering whether
>>Informix does have a special table for this purpose. In Oracle, there
>>is a table called dual for this purpose.
--
Jonathan Leffler #include <disclaimer.h>
Email: jlef...@earthlink.net, jlef...@us.ibm.com
Guardian of DBD::Informix 1.00.PC2 -- http://dbi.perl.org/