Hi Mike.
That's multiple ideas in one reply. I'll break it up and reorder.
> The sysdual table only exists by default in the sysmaster database.
Indeed, that works. And yesterday I happened be in the sysmaster database with it worked with "dual" as opposed to sysdual.
> You could always create a dummy sysdual table in your database.
How would I do that? This is just curiosity now, since I'm writing a monitoring utility that will work mainly from sysmaster.
> If you do want to use systables then do NOT select unique, but add, "where tabid=1"
Of course any table will do. I tried this and it does work so that would have been the way to go if sysdual had failed.
Thanks. I good for now (but still scratching my head over why I remember it working yesterday with dual.)
------------------------------
Jacob Salomon
---
Nobody goes there anymore, it's too crowded. --Attr: Yogi Berra
------------------------------
Original Message:
Sent: Thu April 24, 2025 03:52 PM
From: Mike Walker
Subject: Table dual is not in the database
The sysdual table only exists by default in the sysmaster database. Assuming that you are using logging, you can change your query to be:
select current year to month as this_month,
current year to month - interval(1) month to month as last_month
from sysmaster:dual;
You could always create a dummy sysdual table in your database. If you do want to use systables then do NOT select unique, but add, "where tabid=1" to avoid reading the whole table and having to sort the results.
------------------------------
Mike Walker
xDB Systems, Inc
www.xdbsystems.com
------------------------------