Nicolas JOUANIN wrote :

>create table txr
>  (
>    txd_id VARCHAR(6) not null ,
>    txg_id VARCHAR(9) not null ,
>    txr_id decimal(1,0)
>        default 0 not null ,
>    afm_id VARCHAR(6) not null ,
>    txr_rate decimal(5,3) not null ,
>    txr_rank decimal(2,0),
>    txr_taxpay decimal(1,0),
>    txr_rate_rent decimal(5,3),
>
>    CONSTRAINT ckc_txr_id_txr CHECK ((txr_id >= 0. ) AND (txr_id <= 9. ) ),
>
>    CONSTRAINT ckc_txr_rate_txr CHECK (txr_rate <= 100 ),
>    CONSTRAINT pk_txr PRIMARY KEY (txd_id,txg_id,txr_id)
>  )
>... and the error I get :
>
>Error during execution
>-->-25010
>SQL error -3019 = Invalid exponent:100 (error position: 429)

>It seems to me that SAPDB doesn't like the number format for the check
>constraint or something like that. Any Idea ?

>Nicolas.

The problem is the value of 100 which does not fit into a number having 2 digits
to the left of the decimal point (txr_rate_rent decimal(5,3)).
Please change the constraint ckc_txr_rate_txr to 
CHECK (txr_rate <= 99.999 )

Regards,
Thomas

-- 
Thomas Anhaus
SAP DB, SAP Labs Berlin
[EMAIL PROTECTED]
http://www.sapdb.org/
_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general


_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general

Reply via email to