Good Reference for SQL Equivalent of FormatCurrency([Exclusion],0)

Good Reference for SQL Equivalent of FormatCurrency([Exclusion],0)

am 15.04.2008 19:14:21 von Patrick A

All,

I'm dealing with a 3rd party application that can't interpret the
Access function FormatCurrency.

When it encounters my query with "Exclu: FormatCurrency([Exclusion],
0)", it arfs. The vendor says I have to use "straight SQL."

Can someone point me to a good SQL reference where I can find the SQL
eqiuvalent, assuming there is one?

Thanks,

Patrick

Re: Good Reference for SQL Equivalent of FormatCurrency([Exclusion],0)

am 15.04.2008 19:33:58 von Salad

Patrick A wrote:

> All,
>
> I'm dealing with a 3rd party application that can't interpret the
> Access function FormatCurrency.
>
> When it encounters my query with "Exclu: FormatCurrency([Exclusion],
> 0)", it arfs. The vendor says I have to use "straight SQL."
>
> Can someone point me to a good SQL reference where I can find the SQL
> eqiuvalent, assuming there is one?
>
> Thanks,
>
> Patrick

Is FormatCurrency a function you wrote? From the debug window I entered
? format(1,"Currency")
$1.00

Some Kinda Love
http://www.youtube.com/watch?v=iXbOo5dXAok&NR=1

Re: Good Reference for SQL Equivalent of FormatCurrency([Exclusion],0)

am 15.04.2008 21:31:24 von Patrick A

> Is FormatCurrency a function you wrote? =A0

Nope. I'm not that smart. It's a standard VBA function:
http://msdn2.microsoft.com/en-us/library/aa262746.aspx

Description: Returns an expression formatted as a currency value using
the currency symbol defined in the system control panel.

Syntax: FormatCurrency(Expression[,NumDigitsAfterDecimal
[,IncludeLeadingDigit [,UseParensForNegativeNumbers [,GroupDigits]]]])

> From the debug window I entered ? format(1,"Currency")

I'll check and see if the app understands that better.

Thanks,

Patrick

Re: Good Reference for SQL Equivalent of FormatCurrency([Exclusion],0)

am 15.04.2008 21:56:29 von Salad

Patrick A wrote:

>>Is FormatCurrency a function you wrote?
>
>
> Nope. I'm not that smart. It's a standard VBA function:
> http://msdn2.microsoft.com/en-us/library/aa262746.aspx
>
> Description: Returns an expression formatted as a currency value using
> the currency symbol defined in the system control panel.
>
> Syntax: FormatCurrency(Expression[,NumDigitsAfterDecimal
> [,IncludeLeadingDigit [,UseParensForNegativeNumbers [,GroupDigits]]]])
>
>
>>From the debug window I entered ? format(1,"Currency")
>
>
> I'll check and see if the app understands that better.
>
> Thanks,
>
> Patrick

It should.
? format(1,"$#,###.0")
$1.0
? format(1234,"$#,###.0")
$1,234.0

I used the above format to limit the decimal output.

Re: Good Reference for SQL Equivalent of FormatCurrency([Exclusion],0)

am 15.04.2008 22:50:41 von Stuart McCall

"Patrick A" wrote in message
news:6c573699-b25b-4ac7-8ac7-bed91b93b603@b1g2000hsg.googleg roups.com...
> All,
>
> I'm dealing with a 3rd party application that can't interpret the
> Access function FormatCurrency.
>
> When it encounters my query with "Exclu: FormatCurrency([Exclusion],
> 0)", it arfs. The vendor says I have to use "straight SQL."
>
> Can someone point me to a good SQL reference where I can find the SQL
> eqiuvalent, assuming there is one?
>
> Thanks,
>
> Patrick

I believe FormatCurrency is a scripting function (for ASP pages, VBS Scripts
etc.)
In VBA it's the Format function.