Help with conversions (suite)

Поиск
Список
Период
Сортировка
От Stéphane DEWITTE
Тема Help with conversions (suite)
Дата
Msg-id NOEAIPGJHJIHECKNEIBGKEHGCOAA.stephane@smeso.fr
обсуждение исходный текст
Список pgsql-sql
Hello everybody.

I have a little problem.

Where I make a
select to_number('123456.789','000000.00') or select
to_number('123456.789','000000D00')
I obtain 123456.78

When I try to make that in a function, I have a varchar in ligne.temp8 (ex:
'123456.78910')
temp_dr_cli_cod := to_number(ligne.temp8,''000000000'');

That is good (without decimals of course), but when I try to add a dot or a
'D' in the format field (ex : temp_dr_cli_cod :=
to_number(ligne.temp8,''000000.000'') or temp_dr_cli_cod :=
to_number(ligne.temp8,''000000D000'') I get a error message :
ERROR:  parser: parse error at or near "000000".

Can someone help me ?

Thanks a lot.

Regards,
Stéphane.






В списке pgsql-sql по дате отправления:

Предыдущее
От: "Josh Berkus"
Дата:
Сообщение: Re: Need some help with dates
Следующее
От: Stephan Szabo
Дата:
Сообщение: Re: My is degraded after two weeks