Subject Re: [firebird-support] Formatting currency
Author Svein Erling Tysvær
This is due to your regional settings. If I tried 'select cast(1112223.444 as decimal(18,2)) from rdb$database' I would get 1 112 223,44 since I'm doing things the Norwegian way, if I'd lived in England, I'd expect to get 1,112,223.44 and if I'd lived in India I'd probably get 11,12,223.44 (at least that what it looks like when I try to choose English (India) as the region format on my computer). I assume you live in Germany, I don't think you have to go any further than to Austria to find that there's a space and no dot for every three digits and in Switzerland I expect you would have gotten 1'112'223.44 (that surprised me).

Generally, store numbers as numbers and text as varchar and then think about the presentation when you are displaying things, not when storing them.

HTH,
Set

Den ons. 20. feb. 2019 kl. 12:02 skrev Dimitry Sibiryakov sd@... [firebird-support] <firebird-support@yahoogroups.com>:
20.02.2019 11:57, 'Check_Mail' check_mail@... [firebird-support] wrote:
> if I select this and store it in a varchar-variable, I get 1112223.44, with the point, not
> comma.

   Storing numbers in varchar fields is a big mistake.


--
   WBR, SD.


------------------------------------

------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu.  Try FAQ and other links from the left-side menu there.

Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
------------------------------------

Yahoo Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/firebird-support/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/firebird-support/join
    (Yahoo! ID required)

<*> To change settings via email:
    firebird-support-digest@yahoogroups.com
    firebird-support-fullfeatured@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
    firebird-support-unsubscribe@yahoogroups.com

<*> Your use of Yahoo Groups is subject to:
    https://info.yahoo.com/legal/us/yahoo/utos/terms/