× 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.



LOL - it's going to be kind of hard to put values into something that is not there - a variable to receive the value!

To be more general, all functions in the SQL Reference include the environment in which they can be run. This one would likely say embedded only - others mention interactive, I think, or the like.

Vern

On 9/30/2010 7:52 PM, Lennon_s_j@xxxxxxxxxxx wrote:
Interesting info on values.

I was running from the green screen STRSQL on a V5R3 system. Tonight I
tried using values:
> values week(Current date)
INTO clause missing from embedded statement.
So I'm guessing you can use it only in embedded SQL. Or else I'm doing
it wrongly.

I also took a peek at the V6R1 SQL Reference and it still contains
numerous examples that use SYSDUMMY1. Do you recall where you saw it as
deprecated?

(Finally found the V7R1 reference and it seems to contain the same examples)

Thanks, Sam

On 9/30/2010 9:30 AM, rob@xxxxxxxxx wrote:
The use of sysdummy1 has been deprecated on supported versions of the
operating system. I suggest you use VALUES instead of SELECT for
instances when you are tempted to use sysdummy1

Replace:
select week(current date) from sysibm/sysdummy1
With:
values week(current date)
or in sql rpg
exec sql values week(current date) into :WeekNumber;


Rob Berendt

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.