Update Filed with Percentage

welcomesui@gmail.com

Registered User.
Local time
Today, 09:36
Joined
May 3, 2011
Messages
32
HI All,
Can any one help to my query

I have a table with coloumn called rate, i want to update that filed with percentage as per below criteria.

1. If the rate contains 4th decimal that's rounded to 3rd decimal (Ex. 1.2564 as 1.256 or 3.5689 to 3.569%)
2. if the rate does not contian second decimal add zero (ex. 1.5 to 1.50%)
3. if the rate is 0 add two decial to that 0 (Ex. 0 to 0.00%)
4. if the rate contians only two decimal leave add % to that (Ex. 8.25 to 8.25%)

Fund attached image file for your reference.

Please sugget which query need to used to fullfill above requirements.

Regards,
Hari
 

Attachments

  • rate.JPG
    rate.JPG
    9 KB · Views: 125
Welcome to the forum.

You can do this simply with formatting.

0.00 in the Format property of the record will ensure that all records will show to two decimal places, whilst 0.000 will ensure that they all show three.

However I suspect that you will need to choose one or other of the formats, as I'm not sure you will be able to dynamically select the formatting in the way you want.
 

Users who are viewing this thread

Back
Top Bottom