| From: | pere roca <peroc79(at)gmail(dot)com> |
|---|---|
| To: | pgsql-general(at)postgresql(dot)org |
| Subject: | simple limit of decimals |
| Date: | 2009-01-14 12:43:35 |
| Message-ID: | 21455215.post@talk.nabble.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
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 cannot limit the decimals.
I tried to apply a round in the sql sentence but complains that round must
be applied to a single value each time.
how can I solve it? maybe using numeric? (but I have read numeric reduces
performance...)
thanks!
Pere
--
View this message in context: http://www.nabble.com/simple-limit-of-decimals-tp21455215p21455215.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Reid Thompson | 2009-01-14 12:49:18 | Re: Use PSQLFS for photo storage |
| Previous Message | Thom Brown | 2009-01-14 12:40:56 | Re: Logging on Gentoo |