Friday, February 17, 2012

Extracting currency symbol and measurement units using tSQL

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
MBmukesh bhakta (mukesh_bhakta@.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, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||I have found the only way is to access the Windows registry using the
sp's supplied inside SQL Server.|||mukesh bhakta (mukesh_bhakta@.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, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx

No comments:

Post a Comment