Re: Converting using string

From: Ivan Muravyov <ixm_at_dxi.com>
Date: Fri, 07 May 1999 18:40:07 GMT
Message-ID: <373333DB.DA2CC5DA_at_dxi.com>


> I am trying to get data into my Oracle 7.3.4 from a table which I have on a
> different server and the datatypes doesn't match.
>

It's interesting, what are the datatypes and 'different server' database?

> I have been trying use decode "string" from my application to read into my
> database, but on the other side the dataes that I am trying to get starts
> with three '000' and my tables in Oracle doesn't read them.
>
> How can I "cheat" Oracle to accept this dates?

I don't know what your data looks like, so can only advice to try: 1. Use to_number:
insert into ..... values to_number( my_varchar ), .... It accepts leading zeros and treats them OK. 2. Use string functions 'translate' or 'replace' insert into ..... values replace( my_varchar, '000' ), ..... this will replace ALL '000' combinations with empty strings (simply delete them).

If you explain more, I think, I'll help more.

Jaan. Received on Fri May 07 1999 - 20:40:07 CEST

Original text of this message