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



--
[ Picked text/plain from multipart/alternative ]
I am running into some weirdness. I am creating a view that includes a
column that uses the rand() function.

      create view vern/fetchrand as select rand() rndnbr, orders.* from
tpch/orders

When I try to run SELECT against the view

      select * from vern/fetchrand order by rndnbr

I get

Message ID . . . . . . :   CPF426A       Severity . . . . . . . :   50
Message type . . . . . :   Escape
Date sent  . . . . . . :   11/21/02      Time sent  . . . . . . :   12:35:53

Message . . . . :   User-defined function RAND cannot be invoked.
Cause . . . . . :   External program or service program xxxxxxxxxx in library
   xxxxxxxxxx associated with user-defined function RAND in library QSYS2
   cannot be invoked for reason code 1. The reason codes and their meanings
   follow:
     1 -- The program is not found.

xxxxxxxxxx can be anything - mostly x'00' bytes.

Is there a known restriction (v5r1) that built-in functions cannot be used
in a view? I mean, rand() is not a user-defined function (defined by me,
anyway - it's probably handled the same way, although there appears to be
no external definition of it in QSYS2).
--




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.