Subject RES: RES: [] [Firebird-Java] Absolutely boring...
Author Francisco Antonio Vieira Souza
Wow, thanks Helen and sorry for my off, maybe today I am off.
-----Mensagem original-----
De: Helen Borrie [mailto:helebor@...]
Enviada em: segunda-feira, 24 de maio de 2004 10:51
Para: Firebird-Java@yahoogroups.com
Assunto: Re: RES: [] [Firebird-Java] Absolutely boring...


At 10:23 AM 24/05/2004 -0300, you wrote:
>I think the problem is about decimal places, can I use this?
>
>CREATE DOMAIN D_MOEDA AS
>NUMERIC(16,5)
>DEFAULT 0
>CHECK (VALUE BETWEEN -99999999999999.99 AND +99999999999999.99)
>
>I need to use at least 5 decimal places with DEFAUTL to 0.00, which is
the
>best type for that?

The check constraint is out of range - that is why you are getting the
overflow error. The maximum precision of NUMERIC is 18; with a scale of
5,
your numbers resolve to a precision of 19. Additionally, you declared
your
number with a precision of 16, not 18 (although Firebird stores it as 18,
your check isn't valid for a numeric(16)).

Change your check to

CHECK (VALUE BETWEEN -99999999999.99999 AND +99999999999.99999)

This question is off-topic for this list, btw.

Helen


Yahoo! Groups Sponsor
ADVERTISEMENT





----------------------------------------------------------------------------
--
Yahoo! Groups Links

a.. To visit your group on the web, go to:
http://groups.yahoo.com/group/Firebird-Java/

b.. To unsubscribe from this group, send an email to:
Firebird-Java-unsubscribe@yahoogroups.com

c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.688 / Virus Database: 449 - Release Date: 18/05/2004


[Non-text portions of this message have been removed]