|
This is a multipart message in MIME format.
--
[ Picked text/plain from multipart/alternative ]
This worked:
CREATE VIEW ROB/AAAKEYL01
AS SELECT minute(current time) minut, aaakey.*
from rob/aaakey
and this worked:
CREATE VIEW ROB/AAAKEYL01
AS SELECT rand(1) rndnbr, aaakey.*
from rob/aaakey
but without a seed it doesn't work.
Is it a problem with any other function in which the expression is
optional?
Rob Berendt
--
"They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety."
Benjamin Franklin
Vern Hamberg <vhamberg@centerfieldtechnology.com>
Sent by: midrange-l-admin@midrange.com
11/21/2002 01:52 PM
Please respond to midrange-l
To: midrange-l@midrange.com
cc:
Fax to:
Subject: SQL question - bugs?
--
[ 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).
--
_______________________________________________
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/midrange-l
or email: MIDRANGE-L-request@midrange.com
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.
This mailing list archive is Copyright 1997-2025 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.