469,275 Members | 1,823 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,275 developers. It's quick & easy.

How to format a calculated value in a Query as Currency

I have a query with a salary column, this column is used to multiply by a percentage and creates another column with the result. I want to represent the resulting column as currency values. I need to do this in SQL if you know how to do it I will appreciate if you can share it with me. Many thanks
Jan 31 '07 #1
4 15799
ADezii
8,800 Expert 8TB
I have a query with a salary column, this column is used to multiply by a percentage and creates another column with the result. I want to represent the resulting column as currency values. I need to do this in SQL if you know how to do it I will appreciate if you can share it with me. Many thanks
'Use Format within the SQL string along with the predefined Format of Currency
Expand|Select|Wrap|Line Numbers
  1. SELECT tblTest.ID, tblTest.Data, Format([tblTest].[Price],"Currency") AS Dollar_Amount FROM tblTest;
Jan 31 '07 #2
NeoPa
32,172 Expert Mod 16PB
...but beware, this returns a string value not a number that is displayed as Currency as you might find in a QueryDef. Jet SQL doesn't (can't) specify control of the display of the results except by converting it's type which is a different thing.
Feb 1 '07 #3
ADezii
8,800 Expert 8TB
...but beware, this returns a string value not a number that is displayed as Currency as you might find in a QueryDef. Jet SQL doesn't (can't) specify control of the display of the results except by converting it's type which is a different thing.
Excellent point.
Feb 1 '07 #4
Excellent point.

Thank you very much!
Feb 1 '07 #5

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by John | last post: by
1 post views Thread by staeri | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.