Re: [GENERAL] simple limit of decimals

2009-01-14 Thread Emanuel Calvo Franco
2009/1/14 A. Kretschmer : > In response to pere roca : >> >> dear Andreas, >> >> thanks for the answer; yes, round should be the first, but it gives an >> error: Function round(real, integer) does not exists > > UPDATE point_pol SET taxa_record = round(((SELECT ((CASE WHEN numtax>0 > THEN numt

Re: [GENERAL] simple limit of decimals

2009-01-14 Thread A. Kretschmer
In response to pere roca : > > dear Andreas, > > thanks for the answer; yes, round should be the first, but it gives an > error: Function round(real, integer) does not exists UPDATE point_pol SET taxa_record = round(((SELECT ((CASE WHEN numtax>0 THEN numtax/numreg ELSE 1 END)))::numeric,2)

Re: [GENERAL] simple limit of decimals

2009-01-14 Thread pere roca
dear Andreas, thanks for the answer; yes, round should be the first, but it gives an error: Function round(real, integer) does not exists following this mail (http://archives.postgresql.org/pgsql-bugs/2003-01/msg00074.php) I created a new function and now works! best regards, Pere Andre

Re: [GENERAL] simple limit of decimals

2009-01-14 Thread Scott Marlowe
On Wed, Jan 14, 2009 at 5:43 AM, pere roca wrote: > > hi all, > > I update a column based on a division over two real values. It causes a huge > number of decimals that I wanna to limit. > > UPDATE point_pol SET taxa_record = ((SELECT ((CASE WHEN numtax>0 THEN > numtax/numreg ELSE 1 END))) where u

Re: [GENERAL] simple limit of decimals

2009-01-14 Thread A. Kretschmer
In response to pere roca : > > hi all, > > I update a column based on a division over two real values. It causes a huge > number of decimals that I wanna to limit. > > UPDATE point_pol SET taxa_record = ((SELECT ((CASE WHEN numtax>0 THEN > numtax/numreg ELSE 1 END))) where userid='hello' > > t

[GENERAL] simple limit of decimals

2009-01-14 Thread pere roca
hi all, I update a column based on a division over two real values. It causes a huge number of decimals that I wanna to limit. UPDATE point_pol SET taxa_record = ((SELECT ((CASE WHEN numtax>0 THEN numtax/numreg ELSE 1 END))) where userid='hello' taxa_record values are real and with real I can