03-10-2006 6:36 PM
Hi,
I know this is a very silly thing to ask.
But i got a doubt regarding the data types.
look at this:
<b>tables: zap.</b> " this is a custom table
in this custom table "zap" the field "price" is defined like this:
<b>field</b>| <b>field type</b>| <b>data type</b>| <b>length</b>| <b>dec. point</b>|
-
price| zap_price| dec | 11 | 6
now in the program there is a field declared like this:
<b>data: zap like zap-price.</b>
now my doubt is:
for the field <b>zap-price</b> is the value can be like this?
a) 46578.654876
or
b) 4687.645478
which one is correct.
Please let me know.
thnx for the help.,
03-10-2006 6:42 PM
HI Lope,
Both the values are valid. It can accept both the values.
The problem arises when the no of digits in decimal place exceeds 6. That too they wil be rounded off. you can try it writing a simple program.
Regards,
Varun.
03-10-2006 6:42 PM
HI Lope,
Both the values are valid. It can accept both the values.
The problem arises when the no of digits in decimal place exceeds 6. That too they wil be rounded off. you can try it writing a simple program.
Regards,
Varun.
03-10-2006 6:42 PM
Total length should be 12 characters - one character for decimal point, 6 places after decimal point and 5 before decimal point.
So both options indicate correct value.
Message was edited by: Ashish Gundawar
03-10-2006 6:46 PM
Hi,
You a) point is right & so is point b).
Your definition means..
the total length of the field is 11,out of which a max of 6 places for decimals & ofcourse 1 will be assigned to the sign(- or +).
Message was edited by: Phani Kiran Nudurupati
03-10-2006 6:54 PM