Pessoal,
tivemos uns problemas com conversão de valores numéricos para texto, segue uma solução.

Problema:
Na conversão implicita ou explicita utilizando o Cast e o To_Char ao realizar a conversão de tipos Float ou Number que iniciem com 0,01 ou -0,01 acaba removendo o 0 ficando dessa forma: ,01 e -,01. Esses valores podemos encontrar em dados de latitude e longitude.

Solução:

[et_pb_dmb_code_snippet _builder_version=”4.0.6″ code=”Q3JlYXRlIFRhYmxlIFRlc3RlIChWYWxvciBGbG9hdCk7CgpJbnNlcnQgSW50byBUZXN0ZSBWYWx1ZXMgKCcwLDA5MTg4ODg4ODg4ODg4ODknKTsKSW5zZXJ0IEludG8gVGVzdGUgVmFsdWVzICgnMCwwMzInKTsKSW5zZXJ0IEludG8gVGVzdGUgVmFsdWVzICgnLTAsMDA2MTY2NjY2NjY2NjY2NjcnKTsKSW5zZXJ0IEludG8gVGVzdGUgVmFsdWVzICgnMCwwNzczMDU1NTU1NTU1NTU2Jyk7Ckluc2VydCBJbnRvIFRlc3RlIFZhbHVlcyAoJzAsMDc3NjM4ODg4ODg4ODg4OScpOwpJbnNlcnQgSW50byBUZXN0ZSBWYWx1ZXMgKCcwLDA4NjU4MzMzMzMzMzMzMzMnKTsKSW5zZXJ0IEludG8gVGVzdGUgVmFsdWVzICgnMCwwMzU2MTExMTExMTExMTExJyk7Ckluc2VydCBJbnRvIFRlc3RlIFZhbHVlcyAoJy0wLDEzMzgzMzMzMzMzMzMzMycpOwpJbnNlcnQgSW50byBUZXN0ZSBWYWx1ZXMgKCcwLDA5NTY2NjY2NjY2NjY2NjcnKTsKSW5zZXJ0IEludG8gVGVzdGUgVmFsdWVzICgnMCwwMzcyNScpOwpJbnNlcnQgSW50byBUZXN0ZSBWYWx1ZXMgKCcxLDI1Jyk7Ckluc2VydCBJbnRvIFRlc3RlIFZhbHVlcyAoJy0xLDI1Jyk7Ckluc2VydCBJbnRvIFRlc3RlIFZhbHVlcyAoJzEwLDI1Jyk7Ckluc2VydCBJbnRvIFRlc3RlIFZhbHVlcyAo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cyAoJzEwLDI1Jyk7Ckluc2VydCBJbnRvIFRlc3RlIFZhbHVlcyAoJy0xMCwyNScpOwpJbnNlcnQgSW50byBUZXN0ZSBWYWx1ZXMgKCc5OSwyNScpOwpJbnNlcnQgSW50byBUZXN0ZSBWYWx1ZXMgKCctOTksMjUnKTsKClNlbGVjdCBWYWxvciwgQ2FzdChWYWxvciBBcyBWYXJjaGFyMigyMCkpIEFzIFZhbG9yX0NoYXIxLCBUb19DaGFyKFZhbG9yKSBBcyBWYWxvcl9DaGFyMgpGcm9tIFRlc3RlOw==[/et_pb_dmb_code_snippet]

O select abaixo corrige o problema:

[et_pb_dmb_code_snippet _builder_version=”4.0.6″ code=”U2VsZWN0IFZhbG9yLApDYXNlCldoZW4gU3Vic3RyKENhc3QoVmFsb3IgQXMgVmFyY2hhcjIoMjApKSwgMSwgMSkgPSAnLCcgVGhlbgonMCcgfHwgQ2FzdChWYWxvciBBcyBWYXJjaGFyMigyMCkpCldoZW4gU3Vic3RyKENhc3QoVmFsb3IgQXMgVmFyY2hhcjIoMjApKSwgMSwgMikgPSAnLSwnIFRoZW4KJy0wJyB8fCBTdWJzdHIoQ2FzdChWYWxvciBBcyBWYXJjaGFyMigyMCkpLCAyLCAyMCkKRWxzZQpDYXN0KFZhbG9yIEFzIFZhcmNoYXIyKDIwKSkKRW5kIEFzIFZhbG9yX0NoYXIKRnJvbSBUZXN0ZTs=” hover_enabled=”0″]U2VsZWN0IFZhbG9yLApDYXNlCldoZW4gU3Vic3RyKENhc3QoVmFsb3IgQXMgVmFyY2hhcjIoMjApKSwgMSwgMSkgPSAnLCcgVGhlbgonMCcgfHwgQ2FzdChWYWxvciBBcyBWYXJjaGFyMigyMCkpCldoZW4gU3Vic3RyKENhc3QoVmFsb3IgQXMgVmFyY2hhcjIoMjApKSwgMSwgMikgPSAnLSwnIFRoZW4KJy0wJyB8fCBTdWJzdHIoQ2FzdChWYWxvciBBcyBWYXJjaGFyMigyMCkpLCAyLCAyMCkKRWxzZQp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