×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
sysdummy1 is a single-record table - intended for getting a single value
in a SELECT. There is a physical file that serves the same function -
QSQPTABL.
OP could have got a lot of information by googling on "sysdummy1" - one
entry has this bit -
"The /sysibm.sysdummy1/ table is a special in-memory table that can
be used to discover the value of DB2 registers as illustrated above."
On the i it is not an in-memory table, but that doesn't really matter.
Another google item says "...it was added to maintain consistency with
DB2 for z/OS..."
From DB2 for z/OS -
"The SYSIBM.SYSDUMMY1 table contains one row. The table is used for
SQL statements in which a table reference is required, but the contents
of the table are not important."
Basically it and QSQPTABL are single-record files, and you can use them
to get a result of an expression. Many functions require a single-row
result set.
I use it to test things in interactive SQL. Maybe I want to know what
happens when I work with some date expression - I'll use
SELECT current date - '1959-22-23-11.12.56.123456' from sysdummy1
to see what I'd get. VALUES can't be used in the interactive setting,
although I'd probably use that or SET in a program.
As to which values you can get in VALUES - read the documentation! It's
kind of weird, but it really is just a function that evalutates an
expression and returns the result.
HTH
Vern
Michael Ryan wrote:
I don't think you're pulling anything from that table...it's just a
mechanism to enable you to do SQL things without really having data.
On Fri, Jul 31, 2009 at 9:11 AM, ibm <ibm@xxxxxxxxxx> wrote:
Can someone point me to reference for the valid values to pull from
sysdummy tables?
Thanks
Chris
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.
As an Amazon Associate we earn from qualifying purchases.