Hey there,
ERROR: function round(double precision, integer, integer) does not exist
Any suggestions
Purpose is to generate a 4 digit errorcode 1st letter alpha - rest numeric
my source code:
DECLARE
chars nchar(26);
charpos INTEGER;
character nchar(4);
nentries INTEGER;
key INTEGER;
BEGIN
chars := 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
charpos := Round((random() * (length(chars)-1)), 0, 0);
character := SubString(chars, charpos, 1) ;
nentries := 1;
WHILE (nentries > 0) LOOP
key := trunc(random() * 10000);
SELECT eCode = character + key
SELECT
INTO nentries
count(*)
FROM se_errorcode
WHERE se_errorcode.entry = eCode;
END LOOP;
INSERT
INTO se_errorcode (entry)
VALUES (eCode);
RETURN(eCode);
END;
Thx in advance
Marcel