Home All Groups Group Topic Archive Search About

Extracting currency symbol and measurement units using tSQL

Author
10 Nov 2005 9:06 PM
mukesh bhakta
Hi guys,

Does anyone know how to extract the currency symbol and measurement
unitsusing an ISQL query?


For instance, in .NET I can very easily do the following
-Thread.CurrentThread.CurrentCulture.NumberFormat.CurrencySymbol and
System.Globalization.RegionInfo.CurrentRegion.IsMetric

Is such a thing possible under SQL Server?

Cheers

MB

Author
10 Nov 2005 11:17 PM
Erland Sommarskog
mukesh bhakta (mukesh_bha***@hotmail.com) writes:
> Does anyone know how to extract the currency symbol and measurement
> unitsusing an ISQL query?
>
>
> For instance, in .NET I can very easily do the following
> -Thread.CurrentThread.CurrentCulture.NumberFormat.CurrencySymbol and
> System.Globalization.RegionInfo.CurrentRegion.IsMetric
>
> Is such a thing possible under SQL Server?

I don't think it even makes sense. Measurement unit certanly doesn't,
because SQL Server does not use any measurement unit as far as I recall.

Currency symbols are used with the money data type, but I don't really
know whether this affected by language settings. (Which are separate from
Windows regional settings.) A quick test indicated that all of $, £
and ¤ were understood as currency signs.



--
Erland Sommarskog, SQL Server MVP, esq***@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
Author
14 Nov 2005 11:20 AM
mukesh bhakta
I have found the only way is to access the Windows registry using the
sp's supplied inside SQL Server.
Author
14 Nov 2005 11:42 AM
Erland Sommarskog
mukesh bhakta (mukesh_bha***@hotmail.com) writes:
> I have found the only way is to access the Windows registry using the
> sp's supplied inside SQL Server.

But I can't really see that you have any use for this information?


--
Erland Sommarskog, SQL Server MVP, esq***@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

AddThis Social Bookmark Button