Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old November 23rd, 2005, 01:36 AM
Marcel Boscher
Guest
 
Posts: n/a
Default type cast for ERROR: function chr(double precision) does not exist???

Hello everybody,

i get strange error messages when trying to call up my function

with a SELECT functionname(with or without int);

varying from:

ERROR: function chr(double precision) does not exist
ERROR: function FUNCTIONNAME() does not exist

the problem maybe :
SELECT chr(trunc((random()*26)+65))
is there anything i need to type cast?

i have tried several

CREATE CAST (* AS *);
in particularly every possible row ;-)

DECLARE
anzahl alias for $1;
i int4;
zeichen char(1);
zufallstext text;
entries int8;
BEGIN
LOOP
zufallstext := '';
for i in 1..anzahl LOOP
SELECT chr(trunc((random()*26)+65)) INTO zeichen;
zufallstext := zufallstext || zeichen;
END LOOP;
SELECT count(*) INTO entries FROM se_errorcode
WHERE entry = zufallstext;
EXIT WHEN entries = 0;
END LOOP;
RETURN zufallstext;
END;

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles