If you only want the dollar sign add
'$' +
in front of (ContributionAmount)
SELECT *, '$' + (ContributionAmount) FROM BCC WHERE (CanID =
'::CanID::' AND Industry = '::Industry::') ORDER BY ContributionDate DESC
If you need (ContributionAmount) formated with two decimal places, try
SELECT *, CONVERT(varchar(12), ContributionAmount, 1) AS ContributionAmount,
FROM BCC WHERE (CanID =
'::CanID::' AND Industry = '::Industry::') ORDER BY ContributionDate DESC
:
Thanks, but that didn't work either. Got the same error. I'm digging through
SQL Server books now, it looks like maybe the CONVERT function is the answer.
Anybody know?
:
Try this:
SELECT *, FormatCurrency(ContributionAmount) FROM BCC WHERE (CanID =
'::CanID::' AND Industry = '::Industry::') ORDER BY ContributionDate DESC
--
~ Kathleen Anderson
Microsoft MVP - FrontPage
Spider Web Woman Designs
web:
http://www.spiderwebwoman.com/resources/
Kathleen, thanks for helping -- again.
Problem, though. SQL Server doesn't like the Format command:
"[Microsoft][ODBC SQL Server Driver][SQL Server]'FORMAT' is not a
recognized
function name."
Any ideas?
:
SELECT *, Format(ContributionAmount,'$#,##0.00') as newContributionAmount
FROM BCC WHERE (CanID = '::CanID::' AND Industry = '::Industry::')
ORDER
BY ContributionDate DESC
--
~ Kathleen Anderson
Microsoft MVP - FrontPage
Spider Web Woman Designs
web:
http://www.spiderwebwoman.com/resources/
message
I have found directions for formatting a field as currency, but I'm
uncertain
about the placement of the FORMAT statement.
Here's the SQL from the DBRW:
SELECT * FROM BCC WHERE (CanID = '::CanID::' AND Industry =
'::Industry::') ORDER BY ContributionDate DESC
My table contains a field called ContributionAmount that I want to
format
as
currency. Where would that fit into my SQL statement?
Thanks,
Doug