Syntax Error - Mailing list pgsql-novice

From Marcel Boscher
Subject Syntax Error
Date
Msg-id 4118C344.3020408@emedia-office.de
Whole thread Raw
Responses Re: Syntax Error
List pgsql-novice
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

pgsql-novice by date:

Previous
From: Jake Stride
Date:
Subject: DISTINCT ordering
Next
From: Oliver Elphick
Date:
Subject: Re: Syntax Error