sql server - SQL INSERT INTO: comma as decimal -
my problem customer runs sql server on windows box , country settings set "germany".
this means, decimal point not point .
, it's comma ,
!
inserting double value database works this
insert mytable (myprice) values (16,5)
works fine, far.
the problem comes if there more 1 value decimal places in statement like
insert mytable (myprice, myamount) values (16,5,10)
i error
number of query values , destination fields not same.
can somehow "delimit" values? tried add brackets around not work.
unfortunately cannot change language settings of os or database because writing add-ons existing application.
thank you! ev
you must put data in format allowed database. if put data using comma... may loose out numerical calculations.
if such situation.. check if comma required visibility.. display values in comma format while store them in decimal format.
this way data can processed numeric. need change , fro ui or display.
based on may describe situation in more detail if required.
edit: verify theory can check if insert statement has inserted 165 or 16.5 in database.
insert mytable (myprice) values (16,5); select mytable myprice <17;
Comments
Post a Comment