Re: INSERT INTO... problems (Ammending text)

From: Frank <fvanbortel_at_netscape.net>
Date: Wed, 05 Mar 2003 21:49:06 +0100
Message-ID: <3E6662C2.2050808_at_netscape.net>


Roy B. wrote:
> I've submitted this issue to my support staff but have found this NG
> to be quite helpful and the participants quite knowledgeable. I'm an
> Implementation Specialist for a database application product for
> Government use with OK sql skills. Pasted below is the message I've
> sent to my support staff with which I would appreciate any
> information.
>
> Thanks in advance!
>
> {paste}
> I had a question regarding modifying existing rows in the extended
> text for dockets. Let's look at DKTCD.DKT_CD = 'DECRERC'
>
> SQL> select dkt_cd, dscr from dktcd where dkt_cd = 'DECRERC';
>
> DKT_CD DSCR
> ---------- ------------------------------------------------------
> DECRERC DECREE
>
> This docket code has associated extended text:
>
> SQL> select ext_txt from dktext where dkt_cd = 'DECRERC';
>
> EXT_TXT
> ---------------------------------------------------------
> NOW,
>
>
> S/J:
>
> 1 row selected.
>
> In this extended text, we have 'NOW,' followed by three carriage
> returns. When I put this query in SQL+, it actually returns as:
>
> SQL> select ext_txt from dktext where dkt_cd = 'DECRERC';
>
> EXT_TXT
> ---------------------------------------------------------
> NOW,###S/J:
>
> 1 row selected.
>
> The three bar's (#) each equal a carriage return.
>
> Problem:
> I need to have DKTCD.DSCR text inserted as the first line in
> DKTEXT.EXT_TXT for a given DKT_CD. If this was done for the example
> above (DECRERC) example, the following would be returned as extended
> text:
>
> SQL> select ext_txt from dktext where dkt_cd = 'DECRERC';
>
> EXT_TXT
> ---------------------------------------------------------
> DECREE#NOW,###S/J:
>
> 1 row selected.
>
> This would basically take this description (DKTCD.DSCR = 'DECREE'),
> append it with a carriage return, and insert it at the beginning of
> DKTEXT.EXT_TXT.
>
> {/paste}
>
> Thanks again!

Not sure what the problem is... If you want to get rid of the CR/LF, try: replace(ext_txt, chr(13), '')

-- 
Regards, Frank van Bortel
Received on Wed Mar 05 2003 - 21:49:06 CET

Original text of this message