Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Problem with Money Display

Author  Topic 

savvy
Starting Member

48 Posts

Posted - 2005-09-30 : 07:03:13
I got the columns MinimumSalary and MaximumSalary displayed as 18000 and 24000 which i declared as Money and later converting it as INT as shown below but i want them to be displayed as £18,000 and £24,000 .
Thanks in Advance

SELECT
J.JobID,
J.JobPosition,
J.Region,
J.Place,
J.JobType,
Convert(Char(12), J.JobDate, 103) as JobDate,
Convert(int, J.MinSalary) as MinSalary,
Convert(int, J.MaxSalary) as MaxSalary
FROM JobDetails AS J ....


Savvy

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-09-30 : 07:09:29
You should do this in the Front End Application by using Format function

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

savvy
Starting Member

48 Posts

Posted - 2005-09-30 : 11:15:44
Thanks Madhivanan for ur help.
I used this string function in the front end which worked out perfectly
string.Format("{0:£#,#}", string name)

we can even format it thro the backend to some extent but not exactly as we wish using this format which gives the result as (e.g.£28,000.00) but i wanted as (e.g. £28,000)
'£'+ Convert(varchar,column name,1)

Savvy
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-10-01 : 02:14:42
>>'£'+ Convert(varchar,column name,1)

Dont format money values through queries
You should do in the Front End application

So, use this only
string.Format("{0:£#,#}", string name)

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -