Wednesday, March 7, 2012

Help Needed - "," as decimal Point instead of "."

Hi All,
If we change the System settings to Swedish(Finland), the decimal space is a
Comma "," instead of a Dot "." Now the problem is SQL Server does not
recognize this and gives error. We can not do collation setting for numeric
fields also.
Any help on the same will be highly appreciated.
Regards
Rajib
hi Rajib,
"Rajib Chatterjee" <rajibc@.hotmail.com> ha scritto nel messaggio
news:ev$SNjTXEHA.1144@.TK2MSFTNGP10.phx.gbl...
> Hi All,
> If we change the System settings to Swedish(Finland), the decimal space is
a
> Comma "," instead of a Dot "." Now the problem is SQL Server does not
> recognize this and gives error. We can not do collation setting for
numeric
> fields also.
SQL Server alwayse recognize decimal separator as "." (dot)... provide that
all your expressions are in this format
SET NOCOUNT ON
DECLARE @.n NUMERIC (12 , 5)
SELECT @.n = 1234567.12345
SELECT @.n AS [Number]
, CONVERT(NUMERIC (12 , 5), '1234567.12345') [Cast]
, CASE WHEN @.n = CONVERT(NUMERIC (12 , 5), '1234567.12345') THEN '=' ELSE
'#' END AS [Equal]
--<--
Number Cast Equal
-- -- --
1234567.12345 1234567.12345 =
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.8.0 - DbaMgr ver 0.54.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply
|||hi Rajib,
"Rajib Chatterjee" <rajibc@.hotmail.com> ha scritto nel messaggio
news:ev$SNjTXEHA.1144@.TK2MSFTNGP10.phx.gbl...
> Hi All,
> If we change the System settings to Swedish(Finland), the decimal space is
a
> Comma "," instead of a Dot "." Now the problem is SQL Server does not
> recognize this and gives error. We can not do collation setting for
numeric
> fields also.
SQL Server alwayse recognize decimal separator as "." (dot)... provide that
all your expressions are in this format
SET NOCOUNT ON
DECLARE @.n NUMERIC (12 , 5)
SELECT @.n = 1234567.12345
SELECT @.n AS [Number]
, CONVERT(NUMERIC (12 , 5), '1234567.12345') [Cast]
, CASE WHEN @.n = CONVERT(NUMERIC (12 , 5), '1234567.12345') THEN '=' ELSE
'#' END AS [Equal]
--<--
Number Cast Equal
-- -- --
1234567.12345 1234567.12345 =
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.8.0 - DbaMgr ver 0.54.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply
|||Hi Andrea,
Many Thanks!!
Can you please elaborate it further... We have an application front end
which is passing the data to Stored Procedure in the back end. Front end
changes the decimal places to COMMA automatically and try sending the same
data to back-end and SP fails to update the DB .
The problem is not only with COMMA but with anything apart from DOT "." ,
what SQL Server rejects. What would be the most effective way to develop of
a full proved system.
Regards
Rajib
"Andrea Montanari" <andrea.sqlDMO@.virgilio.it> wrote in message
news:2kbdd5Fc8tmU1@.uni-berlin.de...[vbcol=seagreen]
> hi Rajib,
> "Rajib Chatterjee" <rajibc@.hotmail.com> ha scritto nel messaggio
> news:ev$SNjTXEHA.1144@.TK2MSFTNGP10.phx.gbl...
is
> a
> numeric
> SQL Server alwayse recognize decimal separator as "." (dot)... provide
that
> all your expressions are in this format
> SET NOCOUNT ON
> DECLARE @.n NUMERIC (12 , 5)
> SELECT @.n = 1234567.12345
> SELECT @.n AS [Number]
> , CONVERT(NUMERIC (12 , 5), '1234567.12345') [Cast]
> , CASE WHEN @.n = CONVERT(NUMERIC (12 , 5), '1234567.12345') THEN '=' ELSE
> '#' END AS [Equal]
> --<--
> Number Cast Equal
> -- -- --
> 1234567.12345 1234567.12345 =
> --
> Andrea Montanari (Microsoft MVP - SQL Server)
> http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
> DbaMgr2k ver 0.8.0 - DbaMgr ver 0.54.0
> (my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
> interface)
> -- remove DMO to reply
>
|||Hi Andrea,
Many Thanks!!
Can you please elaborate it further... We have an application front end
which is passing the data to Stored Procedure in the back end. Front end
changes the decimal places to COMMA automatically and try sending the same
data to back-end and SP fails to update the DB .
The problem is not only with COMMA but with anything apart from DOT "." ,
what SQL Server rejects. What would be the most effective way to develop of
a full proved system.
Regards
Rajib
"Andrea Montanari" <andrea.sqlDMO@.virgilio.it> wrote in message
news:2kbdd5Fc8tmU1@.uni-berlin.de...[vbcol=seagreen]
> hi Rajib,
> "Rajib Chatterjee" <rajibc@.hotmail.com> ha scritto nel messaggio
> news:ev$SNjTXEHA.1144@.TK2MSFTNGP10.phx.gbl...
is
> a
> numeric
> SQL Server alwayse recognize decimal separator as "." (dot)... provide
that
> all your expressions are in this format
> SET NOCOUNT ON
> DECLARE @.n NUMERIC (12 , 5)
> SELECT @.n = 1234567.12345
> SELECT @.n AS [Number]
> , CONVERT(NUMERIC (12 , 5), '1234567.12345') [Cast]
> , CASE WHEN @.n = CONVERT(NUMERIC (12 , 5), '1234567.12345') THEN '=' ELSE
> '#' END AS [Equal]
> --<--
> Number Cast Equal
> -- -- --
> 1234567.12345 1234567.12345 =
> --
> Andrea Montanari (Microsoft MVP - SQL Server)
> http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
> DbaMgr2k ver 0.8.0 - DbaMgr ver 0.54.0
> (my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
> interface)
> -- remove DMO to reply
>
|||hi Rajib,
"Rajib Chatterjee" <rajibc@.hotmail.com> ha scritto nel messaggio
news:emEq3nZXEHA.3284@.TK2MSFTNGP12.phx.gbl...
> Hi Andrea,
> Many Thanks!!
> Can you please elaborate it further...
answered privately...
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.8.0 - DbaMgr ver 0.54.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply
|||hi Rajib,
"Rajib Chatterjee" <rajibc@.hotmail.com> ha scritto nel messaggio
news:emEq3nZXEHA.3284@.TK2MSFTNGP12.phx.gbl...
> Hi Andrea,
> Many Thanks!!
> Can you please elaborate it further...
answered privately...
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.8.0 - DbaMgr ver 0.54.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply
|||Thanks a lot!!
"Andrea Montanari" <andrea.sqlDMO@.virgilio.it> wrote in message
news:2kdf5eF10epbU1@.uni-berlin.de...
> hi Rajib,
> "Rajib Chatterjee" <rajibc@.hotmail.com> ha scritto nel messaggio
> news:emEq3nZXEHA.3284@.TK2MSFTNGP12.phx.gbl...
> answered privately...
> --
> Andrea Montanari (Microsoft MVP - SQL Server)
> http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
> DbaMgr2k ver 0.8.0 - DbaMgr ver 0.54.0
> (my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
> interface)
> -- remove DMO to reply
>

No comments:

Post a Comment