Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Currency - Column Type - $13.10 and not $13.1

Status
Not open for further replies.

TheDeaner

Technical User
Oct 13, 2004
11
US
Anyone that can help with this will be appreciated.

I am using Navicat and setting up a simple database.
I want currency to show up properly.

Ex: 13.10 should show up 13.10 and not 13.1

I set up the column as decimal and decimals I set to 2. I have Zerofill clicked. But when I add a record or import anything, it doesn't show up correctly. Does anyone have an idea?

Thanks
Dean
 
MYSQL version 4.0.21 for Windows

Thanks
Dean
 
I can't replicate your problem, but I'm running 4.1.7 on Linux.

I created a table as:

create table foo (foo decimal(6,2));

Then I performed:

insert into foo values (51),(-23),(89.3),(-22.1),(17.3),(45.30),(17.33);

When I perform the query:

select * from foo;

I get:

[tt]+--------+
| foo |
+--------+
| 51.00 |
| -23.00 |
| 89.30 |
| -22.10 |
| 17.30 |
| 45.30 |
| 17.33 |
+--------+[/tt]



Want the best answers? Ask the best questions!

TANSTAAFL!!
 
I am not sure what I changed but now it is working.
Thanks for taking the time to test this out for me.

Dean
 
I'm glad you're not longer having the problem. But I hate problems that cure themselves -- you never know when they'll uncure themselves.


Want the best answers? Ask the best questions!

TANSTAAFL!!
 

I definitely agree with you there, but the problems I hate most are when something breaks and when you figure out what it is you have to say, "I know what's wrong and I know how to fix it, but I don't understand how it was ever working in the first place."

:)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top