in reply to Re: Re: Thousands separator - this is getting annoying
in thread Thousands separator - this is getting annoying

That doesn't make any sense, unless, as agentM suggest, your number field is represented internally as a string. While you might have some unusual reason for doing so, it's not a good idea.

If possible, I'd put the burden of conversion on the database. Depending on what you're using, and how you're querying it, you might be able to use

SELECT INT(field) FROM table

-or-

SELECT CONVERT(NUMERIC (10,2),field) FROM table

good luck!

Replies are listed 'Best First'.
Re: Re: Re: Re: Thousands separator - this is getting annoying
by chipmunk (Parson) on Jan 17, 2001 at 00:20 UTC
    That doesn't make any sense, unless, as agentM suggest, your number field is represented internally as a string.

    Actually, it's likely that the database is storing the numbers as numbers, but that the format used when a number is retrieved from the database specifies commas. For example, in Oracle SQL*PLUS:

    14:23:48 FOCX> desc mytable Name Null? Type ----------------------------------------- -------- ---------------- ID NUMBER(7) 14:23:56 DB> select id from mytable; Press <enter> to continue... ID ------- 1000 1001 14:23:59 DB> set numformat 999,990 14:24:06 DB> / Press <enter> to continue... ID -------- 1,000 1,001