SQL-Server

Moderators: None (Apply to moderate this forum)
Number of threads: 435
Number of posts: 788

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
I need help with a calculated column in sql and formatting Posted by rico33126 on 10 Oct 2012 at 1:29 PM
Hi there and thanks in advance for your help.

I have a table with an amount and rate columns.

I am creating a view based on this table and I want to add a calculated column that will provide the result between the amount and the rate columns.

SELECT dbo.Invoices.Amount,
dbo.Invoices.TransactionRate,
dbo.Invoices.Amount * dbo.Invoices.TransactionRate AS Trans_Amt
FROM dbo.Properties

The query and the creation of the Trans_Amt column works fine.

The problem is that the calculated column has too many decimal places and I do not know how to format the calculated column to show only 2 decimal places.

I am using Access as the GUI

Regards

Rio





 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.