×
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.
SELECT * FROM (VALUES('Constant1')) AS myTable(myColumn)
As you can see, it replaces the need for SYSIBM/SYSDUMMY1 reference in
interactive SQL and like. It also ought to perform better as no ODP is
required.
As for programmatic use of VALUES INTO, it is indeed be very useful and a
much better option than SYSDUMMY1.
I however prefer using the SET keyword, i.e.:
SET :myVar = CURRENT_DATE;
It just seems 'cleaner' on my eyes than VALUES INTO.
As for the OP (Original Poster), you can think of SYSIBM/SYSDUMMY1 as
Oracle's DUAL table. In SQL Server, you wouldn't even need a one-row
guaranteed table (TSQL doesn't require a FROM clause).
It's useful in interactive SQL environments for evaluating special registers
(i.e. CURRENT_TIMESTAMP) or UDFs (User Defined Functions).
Hth, Elvis
Celebrating 11-Years of SQL Performance Excellence on IBM i, i5/OS and
OS/400
www.centerfieldtechnology.com
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact
[javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.