Connecting Tech Pros Worldwide Help | Site Map
Reply
 
LinkBack Thread Tools Search this Thread
  #1  
Old July 2nd, 2008, 12:45 PM
lotus18's Avatar
Site Addict
 
Join Date: Nov 2007
Location: Zamboanga City, Philippines
Posts: 851
Default Asking what datatype should I used?

Hello World!

I am currently working on a field that contains 'Prices'
I declared its datatype as double, Length=7 and Decimals=2and it works fine but a problem arises when the decimal contains a fixed .00

This is working:
Expand|Select|Wrap|Line Numbers
  1. 789.69
  2. 56.36
  3. 7853.15
When I insert new values
Expand|Select|Wrap|Line Numbers
  1. 789.00 becomes 789
  2. 56.00 becomes 56
  3. 7853.00 becomes 7853
Rey Sean
Reply
  #2  
Old July 2nd, 2008, 12:53 PM
amitpatel66's Avatar
Moderator
 
Join Date: Mar 2007
Location: India
Age: 24
Posts: 2,044
Default

Convert the data in to two decimal places while fetching from the table? What happens in this case?
Reply
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 205,248 network members.