Re: Umm, almost embarrassed to ask this, but....
Posted in 1998
In article <34DB8723.410D@netcomuk.co.uk>,
Neil Truby <ntruby@netcomuk.co.uk> wrote:
>What's the best way to retrieve the value of a system variable, say
>TODAY? Obviously, I can do:
>
>SELECT TODAY from table1
>where key='aaa'>
>but I have to know that this will return a single row. How about a
>general select statement that doesn't require detailed knowledge of a
>table's data?
The standard way to do this seems to be:-
select today
from systables
where tabid = 1
If I were given to making universal assertions I would probably claim
that all Informix databases have a table called "systables" and it
always has exactly one row whose tabid is 1; so instead I will merely
say that this has been the case with all Informix databases that it
has been my pleasure to meet.
Paul (not a spokesman)
P.S. When I used Horracle we did "SELECT .... from DUAL" instead.
P.P.S. Chase Manhatten bank is now in Bournemouth?