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



Interesting - I got it to work with a seed, too. Without a seed, it's
supposed to use machine time or something. It ought to work, IMO.

With a seed, the sequence is the same all the time, but the calling app
could probably use some substitution variable to modify this from run to run.

Are there other functions with optional arguments?

Looks like a bug to me. When I have time I'll report it.

Thanks

Vern

At 02:12 PM 11/21/2002 -0500, you wrote:
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.



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.