Showing posts with label separator. Show all posts
Showing posts with label separator. Show all posts

Friday, March 9, 2012

Decimal Separator with Comma... is Possible?

In Sql Server Express

I need use in field MONEY

"update product set price='1,23' where cod='001'"

i don′t use

"update product set price='1.23' where cod='001'"

hi,

with all kind of datatypes supporting fixed or non fixed decimal values you have to use the "." as decimal separator... so you have to code

UPDATE ... SET price = 1.23 WHERE...

and this without the " quote for the value...

regards

Decimal Separator in SQL Server with Comma... is possible?

In Brazil decimal separator=comma

SQL SERVER

LANGUAGE=BRAZILIAN OR PORTUGUESE

PRICE=MONEY

"UPDATE PRO SET PRICE='1,11' WHERE COD='0001'"

PRICE=111.00

all aplications use comma... impossible alter all!

Programmatically in SQL you will need to use a dot insted of a comma but the data can be displayed in the front using a comma provided you have the correct regional settings on the front end.

decimal separator

Hi

Im experimenting with the reportViewer control in a .net 2.0 winform application, and I'm having a little problem: I can find no way to change the decimal separator(or the thousand separator) of a column of numbers in a table. I have tried all sorts of Format(), formatNumber() and FormatCurrency(). I've also tried to explicitly set the CurrentCulture of the application to a new cultureinfo object, and I've tried to change the culture of the datasets that the reports are base on.

Also, when calling the FormatCurrency() the output allways shows $ even though I find no trace of using USD anywhere in my system.

Any constructive hints out there?

Than you in advance,

Snorre

In ReportViewer control properties you can change Language property and that will change format for number, date, currency ...
|||

Thanks for your reply. Although I can't find the Language property anywhere: In the property page, in the intellisence, on the LocalReport object or anywhere else. Are you using the winform version of the control? Are there different versions of the control? I'm using the one shipping with visual studio.

Thanks.

Snorre

|||

I finally figured this out.

There was a Language property as suggested, not on the controller, but on the textbox(and table/matrix/chart) element in the report. What confused me though was that this box was overridden when using something like:

=format(sum(Fields!myfield.Value),"#,###.00")

To correct this I had to put the format string in the property field instead, and remove the formatting from the formula. Hope this helps someone...

Snorre