# Internationalization and numbers between Samba and SQL

**URL:** <https://forum.sambapos.com/t/internationalization-and-numbers-between-samba-and-sql/3187>\
**Category:** V4 Question\
**Created:** [October 29, 2014, 11:12am UTC](https://forum.sambapos.com/t/internationalization-and-numbers-between-samba-and-sql/3187 "2014-10-29T11:12:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![gerlandog](https://forum.sambapos.com/user_avatar/forum.sambapos.com/gerlandog/32/39076_2.png) [@gerlandog](https://forum.sambapos.com/u/gerlandog)\
**Post date:** [October 29, 2014, 11:12am UTC](https://forum.sambapos.com/t/internationalization-and-numbers-between-samba-and-sql/3187/1 "2014-10-29T11:12:33Z")

</div>

I need some help here with `,` and `.` (decimal sep and 1000 sep).  
I am using, and its working fine, the Resgister CASH saving option. So I am storing at the beginning and at the end of a work perido how much cash we have in the cash register and how much in CC.

My decimal separator everywhere is `,`. All is working great. I have made a Report that shows CASH resgister Entities.

So far so good.

Now I decided to go one step further, and start doing some calculations with this. The problem I am facing is that samba (correctly) uses `,` as a decimal separator in my configuration.

Regardless what is your PC configuration, SQL stores decimal separator as a `.`. So when I try to convert `Entities CustomData` stored correctly with `,` SQL complains that its not possible to convert it to a number since it contains `,` and not `.`

The data stored in `CustomData` is:

```
[{"Name":"Apertura","Value":"97,15"},{"Name":"Cierre","Value":"689,05"},{"Name":"Tarjetas","Value":"43,80"}]

```

for those who are SQL experts… how can I convert `97,15` to `97.15`?

THANKS!!!

G.

---

<div class="post-metadata">

**Author:** ![morshed1](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/m/8c91f0/32.png) [@morshed1](https://forum.sambapos.com/u/morshed1)\
**Post date:** [October 29, 2014, 11:44am UTC](https://forum.sambapos.com/t/internationalization-and-numbers-between-samba-and-sql/3187/2 "2014-10-29T11:44:49Z")

</div>

Not an expert on SQL but below link may provide some clues

> <https://stackoverflow.com/questions/10271548/how-to-convert-integer-to-decimal-in-sql-server-query>

---

<div class="post-metadata">

**Author:** ![gerlandog](https://forum.sambapos.com/user_avatar/forum.sambapos.com/gerlandog/32/39076_2.png) [@gerlandog](https://forum.sambapos.com/u/gerlandog)\
**Post date:** [October 29, 2014, 11:46am UTC](https://forum.sambapos.com/t/internationalization-and-numbers-between-samba-and-sql/3187/3 "2014-10-29T11:46:55Z")

</div>

ja… that is not my problem…

SQL refuses to convert `97,15` to `97.15` becuase the `,` is a special character and not a decimal separator.

Thanks!!!

G.

---

<div class="post-metadata">

**Author:** ![gerlandog](https://forum.sambapos.com/user_avatar/forum.sambapos.com/gerlandog/32/39076_2.png) [@gerlandog](https://forum.sambapos.com/u/gerlandog)\
**Post date:** [October 29, 2014, 12:05pm UTC](https://forum.sambapos.com/t/internationalization-and-numbers-between-samba-and-sql/3187/4 "2014-10-29T12:05:58Z")

</div>

I´ve got it…

```
REPLACE('97,15',',','.')

```

That returns `97.15` from `97,15`

THANKS!!!

G.
