Syntax Error
От | Marcel Boscher |
---|---|
Тема | Syntax Error |
Дата | |
Msg-id | 4118C344.3020408@emedia-office.de обсуждение исходный текст |
Ответы |
Re: Syntax Error
|
Список | 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 по дате отправления: