Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Sql Server NTEXT fields

Re: Sql Server NTEXT fields

From: Grant Allen <gxallen_at_gmail.com>
Date: Wed, 3 May 2006 10:17:43 +1000
Message-ID: <e2451e6a0605021717n1c7a7dcaxf67a6520dd270df4@mail.gmail.com>


On 5/3/06, Goulet, Dick <DGoulet_at_vicr.com> wrote:
> Folks,
>
> I've got a copy of Oracle's Gateway to Sql Server so that we can
> integrate data from a third party, mom & pop created application with
> other data stored in Oracle. This application has a number of NTEXT
> fields where comments and the like are being stored, but in Rich Text
> Format. Now from the manual:
>
> You cannot use SQL*Plus to select data from a column defined as
> Microsoft SQL
> Server data type IMAGE, TEXT or NTEXT when the data is greater
> than 80
> characters in length.
>
> Anybody know how to strip the rtf stuff out especially from the
> Microsoft side??

Two techniques combined will help - I've done this before, though performance wasn't one of the design criteria.

On the SQL Server side, you can create a view based on cast/convert of the NTEXT field, to varchar. The SQL Server limit on varchar is 8000, so watch your equivalent Oracle declarations for Oracle's 4000 limit. On top of that, SQL Server's "stuff" function (I kid you not, that's its name) is equivalent to Oracle's Replace function, and you can use this to strip out any characters you don't want (like all the RTF formatting crap).

Roll all this together, and you get all the hard work done on the SQL Server side, and can just get on with life on the Oracle side of things.

Happy hacking.

Ciao
Fuzzy
:-)

--
http://www.freelists.org/webpage/oracle-l
Received on Tue May 02 2006 - 19:17:43 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US