f



Re: Replace a carriage return in a text field

----=_vm_0011_W853083665_20681_1178885376
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit

I usually unload the primary key and the field in question to a file on unix, and use the 'tr' command to get rid of any control characters, then load it back up with a sql statement.

<DIV><FONT face=Verdana size=2>&nbsp;</FONT></DIV>
<br>
======================== <br>
email: floyd@fwellers.com <br>
Home: 703-430-0805 <br>
Cell: 703-477-6045 <br>
======================== <br>
<br>
www.one.org <br>
<br>
<br>
<br>


>-----Original Message-----
>From: jared.hanks@gmail.com [mailto:jared.hanks@gmail.com]
>Sent: Thursday, May 10, 2007 09:05 PM
>To: informix-list@iiug.org
>Subject: Replace a carriage return in a text field
>
>Hello,
>
>I need to remove carriage returns in a text field. Does anyone know
>how to do this? I've tried the following:
>
>update item_table
>Set long_description = replace(long_description,"~r"," ")
>where inv_id = "130539";
>
>and I get the following error: "674: Routine (replace) can not be
>resolved."
>
>I've also tried:
>
>Update items_table
>Set long_description = replace(replace(long_description,
>char(10),char(13)),char(13),' ')
>where inv_id = "130539";
>
>and I get the following error: "674: Routine (char) can not be
>resolved."
>
>I tried looking at the manual but couldn't figure it out.
>
>Any help is appreciated.
>
>Thanks,
>Jared
>
>_______________________________________________
>Informix-list mailing list
>Informix-list@iiug.org
>http://www.iiug.org/mailman/listinfo/informix-list
>


----=_vm_0011_W853083665_20681_1178885376
Content-Type: text/html; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<html><P>I usually unload the primary key and the field in question to a =
file on unix, and use the 'tr' command to get rid of any control characte=
rs, then&nbsp; load it back up with a sql statement.</P>
<P>&nbsp;</P>
<P>&lt;DIV&gt;&lt;FONT face=3DVerdana size=3D2&gt;&amp;nbsp;&lt;/FONT&gt;=
&lt;/DIV&gt;<BR>&lt;br&gt;<BR>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D &lt;br&gt;<BR>email: floyd@fwellers.com &lt;b=
r&gt;<BR>Home: 703-430-0805 &lt;br&gt;<BR>Cell: 703-477-6045 &lt;br&gt;<B=
R>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 &lt;br&gt;<BR>&lt;br&gt;<BR>www.one.org &lt;br&gt;<BR>&lt;br&gt;<BR>&lt;=
br&gt;<BR>&lt;br&gt;<BR><BR><BR>&gt;-----Original Message-----<BR>&gt;Fro=
m: jared.hanks@gmail.com [mailto:jared.hanks@gmail.com]<BR>&gt;Sent: Thur=
sday, May 10, 2007 09:05 PM<BR>&gt;To: informix-list@iiug.org<BR>&gt;Subj=
ect: Replace a carriage return in a text field<BR>&gt;<BR>&gt;Hello,<BR>&=
gt;<BR>&gt;I need to remove carriage returns in a text field. Does anyone=
 know<BR>&gt;how to do this? I've tried the following:<BR>&gt;<BR>&gt;upd=
ate item_table<BR>&gt;Set long_description =3D replace(long_description,"=
~r"," ")<BR>&gt;where inv_id =3D "130539";<BR>&gt;<BR>&gt;and I get the f=
ollowing error: "674: Routine (replace) can not be<BR>&gt;resolved."<BR>&=
gt;<BR>&gt;I've also tried:<BR>&gt;<BR>&gt;Update items_table<BR>&gt;Set =
long_description =3D replace(replace(long_description,<BR>&gt;char(10),ch=
ar(13)),char(13),' ')<BR>&gt;where inv_id =3D "130539";<BR>&gt;<BR>&gt;an=
d I get the following error: "674: Routine (char) can not be<BR>&gt;resol=
ved."<BR>&gt;<BR>&gt;I tried looking at the manual but couldn't figure it=
 out.<BR>&gt;<BR>&gt;Any help is appreciated.<BR>&gt;<BR>&gt;Thanks,<BR>&=
gt;Jared<BR>&gt;<BR>&gt;_______________________________________________<B=
R>&gt;Informix-list mailing list<BR>&gt;Informix-list@iiug.org<BR>&gt;htt=
p://www.iiug.org/mailman/listinfo/informix-list<BR>&gt;</P></html>

----=_vm_0011_W853083665_20681_1178885376--


0
floyd
5/11/2007 12:09:36 PM
comp.databases.informix 16083 articles. 0 followers. Post Follow

0 Replies
909 Views

Similar Articles

[PageSpeed] 5

Reply:

Similar Artilces:

Replace a carriage return in a text field
Hello, I need to remove carriage returns in a text field. Does anyone know how to do this? I've tried the following: update item_table Set long_description = replace(long_description,"~r"," ") where inv_id = "130539"; and I get the following error: "674: Routine (replace) can not be resolved." I've also tried: Update items_table Set long_description = replace(replace(long_description, char(10),char(13)),char(13),' ') where inv_id = "130539"; and I get the following error: "674: Routine (char) can not be resolved." I tried looking at the manual but couldn't figure it out. Any help is appreciated. Thanks, Jared Hi, I am very new to informix, wants to know dose the connect by prior clause will work with IDS. if not then is there anything similar to that. Regards, Ashish ...

Insert carriage return in a text field to warp text down
I've imported data from a database - containing separate fields for name, address and postcode, into one single text field in another database (I know that's rotten database practice, but I was asked to do this at work). I concatenated the fields in the "donor database then mapped the single concatenated field to the recipient single text field on import. I now have a field containing name, address and postcode, with spaces between each element(I inserted them), but of course there is no wrapping. I now have (example) MrTest Name Test Address TestPostcode in a single text field...

Re: How can labview update the string control (text-edit box) after we have pressed the carriage return key on the keyboard during text-editing within that box?
Hello Alberto, &nbsp; I have trouble to edit an exited text file and save it after the content changed. Can you please&nbsp;help me out? &nbsp; Thanks, Jason&nbsp; ...

Carriage Return in text field on form?
Can I change the behavior of using the enter key in a text box? The current behavior when using a carriage return is that you will be taken to the next field. I don't want that to occur, I want the cursor to go to the next line in the same field. Possible? Thanks again in advance! Tom You can if the field is a memo. You have to trigger editentermemoview when you arrive or go into edit mode. See the constants section of the opal help. Denn Santoro President Resource Development Associates http://www.RDAWorldWide.Com Offices in the United States and Germany Provi...

Splitting a text field conatining a carriage return.
I have a field in an access 2000 database that is actually three lines of text separated by carriage returns. Is there a function in the Access version of SQL that will let me locate the carriage returns and then split the field based on the positions of the carriage returns? Or do I need to process the field with Visual Basic? I seached for an answer to this on the web. I found an answer that said to use the CHARINDEX function but that is apparently not a part of ACCESS 2000 because I get an error message saying that it is invalid. Thanks in advance for your help. Greg Teets Cincinna...

Why does the Database Connectivity Toolkit not return my text fields?
I'm running LV 8.2.1 and have the Database Connectivity Toolkit. My database is served by MS SQL Server 2005.&nbsp; The table looks like this: &lt;meta http-equiv="Content-Type" content="text/html;charset=UTF-8">dbo_Test dbo_Test ID Text 1 abc 2 def 3 slkdfj 4 owierlkjsdf 5 soiwuers A snapshot of my vi block diagram is attached.A snapshot of my vi front panel is attached.Where is the text?<img src="file:///C:/DOCUME%7E1/s156556/LOCALS%7E1/Temp/moz-screenshot.jpg" alt=""><img src="file:///C:...

Re: Carriage Return in %LABEL/Annotate Graphics text?
Have you tried using 'OA'x as well? Under Windows, the CR requires a LF character for completeness, which is different to Unix. So you may need to send the pair for this to work. I recall I had some grief getting the sequencing correct to send line breaks to text blocks in the Windows API message box. Kind regards David -----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU]On Behalf Of Paige Miller Sent: Tuesday, 17 July 2007 3:28 AM To: SAS-L@LISTSERV.UGA.EDU Subject: Carriage Return in %LABEL/Annotate Graphics text? Is it possible to cause a carria...

Re: Carriage Return in %LABEL/Annotate Graphics text? #5
Hello Ya and all, I'm very sorry, but I forgot one very important piece of information which makes this technique work for me while you are correct that it does NOT work directly in SAS/Graph. What I do is to export my SAS/Graph output as WMF, then import the results into Corel Draw, where I also bring in output from other sources and make further customizations and modifications. Once the SAS/Graph output is imported into Corel Draw, the CRLF characters have exactly the desired effect on the SAS/Graph labels, creating labels with multiple lines. However, I automate this process to a l...

[UNIFACE-L:4727] RE: removing carriage returns from text
David, the function $replace solves your problem. Just try it on a string containing CR/LF as follows: file_load "./Test.txt", $1 ; Load some text containing CR/LF $2 = $replace ($1,1,"%%^","",-1) ; Remove all CR/LF occurrences (or use " " to replace with a blank) message/info $2 ; Display result Oscar Rondinelli Accord Software Inc. -----Original Message----- From: David Lawrence [mailto:dl@mercsys.com.au] Sent: Monday, January 19, 2004 12:49 AM To: UNIFACE-L@uug.org Subject: [UNIFACE-L:4721] removing carriage returns fro...

Re: How to convert carriage return to another char string in Informix
Doug Lawry wrote: > Your function could be used as follows in any 4GL version: > > replace("xyz", ASCII(10), "-") > You can do that natively in 4gl? or in SQL. -- Atte, Jesus Antonio Santos Giraldo ----------------------------------- jeansagi@myrealbox.com jeansagi@netscape.net sending to informix-list Native 4GL but not SQL or SPL. You don't in fact need the brackets, for example MAIN DEFINE x CHAR(10) LET x = "ABC", ASCII 10, "DEF" DISPLAY x END MAIN pro...

Re: Carriage Return in %LABEL/Annotate Graphics text? #2
Paige, The following doesn't answer your question, but does provide a work around: http://robslink.com/SAS/democd3/news_info.htm Art --------- On Mon, 16 Jul 2007 17:28:03 -0000, Paige Miller <paige.miller@KODAK.COM> wrote: >Is it possible to cause a carriage return when using the ANNOTATE >%LABEL macro, or the equivalent in ANNOTATE commands? > >For example, thinking that '0D'x was a carriage return, I tried > >%label(x,y,"Line 1"||'0D'x||"Line 2",black,0,0,3,simplex,5) > >but that didn't work. Is this possible to d...

Re: Carriage Return in %LABEL/Annotate Graphics text? #3
I create multi-line labels using annotate data sets in SAS/Graph under Windows all the time using '0D0A'x as the line separator. Works fine. s/KAM ----- Original Message ----- From: "Arthur Tabachneck" <art297@NETSCAPE.NET> To: <SAS-L@LISTSERV.UGA.EDU>; "(GVSUG) Mike Molter" <paige.miller@KODAK.COM> Sent: Wednesday, July 18, 2007 20:27 Subject: Re: Carriage Return in %LABEL/Annotate Graphics text? > Paige, > > The following doesn't answer your question, but does provide a work > around: > > http://robslink.com/SAS/democd...

Re: Carriage Return in %LABEL/Annotate Graphics text? #4
Hi Kevin, Are you sure it worked in SAS/Windows? I'm a bit surprised since I remember tested it before and it did not work. After seeing your post I test it again with the following little piece code: data anno; length function $8 text $40; retain xsys ysys '3'; function='label'; x=50; y=50; text='Break'||'0D0A'x||'it'; output; run; proc gplot data=sashelp.class; plot weight*age /annotate=anno; run; As you can see, it still does not work. It makes sense to me, since label function has another parameter 'position', which I believe is for a...

Remove the last carriage return and line feed from sql text field
I am trying to write a user defined function that will allow me to strip off the last carriage return and line feed from a text field. We have address fields stored in a text field for our ERP system and some of them have an extra carriage return and line feed at the end of them. This causes havoc when we sync between our ERP system and CRM system. If anyone knows a way to solve this problem the help would be appreciated. Examples: Existing Text field with CR: 1234 Blah Street<CR> Suite 2345<CR> Corrected Text field: 1234 Blah Street<CR> Suitr 2345 (whitej77777@gmail...

FM10 How to insert pilcrow "carriage return" into text in a field
How can one insert pilcrow (carriage return) into text in a field. Plan is to do a search & replace. What key strokes are involved in creating a "carriage return" in Filemaker 10? On Fri, 7 Aug 2009 20:33:35 -0700 (PDT), H A wrote: > How can one insert pilcrow (carriage return) into text in a field. > > Plan is to do a search & replace. What key strokes are involved in > creating a "carriage return" in Filemaker 10? Apple-shift-0 (German keyboard layout, otherwise apple-=) Mouseclick on first button (Specify) s, u, b, s, t, i, t, u, t, e, (, G, e,...

Re: How to convert carriage return to another char string in Informix SQL or 4GL
Have you tried using C escapes from 4GL (\r or \015 for <CR>, \n or \012 for <LF>)? Mind you, I am not at all sure that will work, haven't used 4GL in more than a decade, don't remember whether strings are ordinary C char arrays and don't have docs :-) Alternatively, you could write your own little C function to do that and link it into your 4GL program (or even massage ESQL/C files - those with ..ec extension - that are result of the first phase of 4GL compilation - dirty but quick ;-) Cheers! Dragi "Bonzi" Raos Zagreb, Croatia ----- Orig...

Problem with carriage return/newline character when writing SAS database to a text file...
I had a table in Excel which included an ID (identification number), COMMENTS, and AMOUNT column. The COMMENTS column were text notes (up to 2000 characters) commenting on the corresponding ID. I imported this table (via proc import) into a SAS dataset and then used the file and put statements to write the dataset to a fixed-length text file (i.e., for each record, the ID variabe was outputted to positions 1-4, COMMENTS outputted to positions 6-2005, and the AMOUNT column outputted to positions 2007-2012). The text file, however, did not come out how I expected because some of the text in th...

Need to download exact copy of text file...little squares replace carriage returns
I need to download a text file from my server. I've tried to use a program to email it and another to make the browser download the file with a file save as dialog. The text file has a few charaters and then some spacing, as many as 120 spaces following by a new line. (line feed carriage return) I hear unix or linux stores a new line as a line feed only. After the file is saved to my hard disk through the save file routine, I should be able to open it up in notepad and not see a whole bunch of little squares which replaced all the carriage returns. I need an exact copy of the file as ...

Re: How to convert carriage return to another char string in Informix SQL or 4GL #2
Have you tried using C escapes from 4GL (\r or \015 for <CR>, \n or \012 for <LF>)? Mind you, I am not at all sure that will work, haven't used 4GL in more than a decade, don't remember whether strings are ordinary C char arrays and don't have docs :-) Alternatively, you could write your own little C function to do that and link it into your 4GL program (or even massage ESQL/C files - those with ec extension - that are result of the first phase of 4GL compilation - dirty but quick ;-) Cheers! Dragi "Bonzi" Raos Zagreb, Croatia ----- Original Message ----- From: "Wayne T" <ntrieu@yahoo.com> To: <informix-list@iiug.org> Sent: Friday, January 02, 2004 3:55 PM Subject: How to convert carriage return to another char string in Informix SQL or 4GL > I am post this question for my co-worker, here is his questions. Any > help would be appreciated. > > Hi, > > In a databse table there is a field of type character or string - or > whatever informix calls it. This string contains new line characters > or carriage returns. > In a 4gl program this field is queried and printed. > > Just before this field is printed the line number internal variable > "lineno" is , say, 10. Then this field is printed. Lets say the field > has one new line character > ( IN other words the field contains" > > Hello, > How are you." > ...

How to copy a sun-database in one informix database to another informix database?
Hi, Sorry I am not an informix dba, and I was faced to copy a sub-database(sorry I don't know the clear name of such concept, as informix is like sql-server, which used multiple database) from one informix database system to another informix database. I know in oracle, we can use transportable tablespace, copy the datafile and transport the metadata, and do something else. How can I do it in informix then? Is there document which talk about the detail step? Thanks It would really help if you knew the versions of the Informix databases. Assuming Informix IDS 7.x or IDS...

Adding long text to a database text field generates errors
I'm using PostgreSQL on a Windows 2000 server and cygwin. All is set up just fine. The database works just fine, and ASP is connecting to the database through a DSN just fine. The only problem I seem to have is adding a large amount of text to a text column in the database. I can enter up to 8,118 characters (including spaces), but when I go over that amount, I receive the following error: Microsoft OLE DB Provider for ODBC Drivers error '80040e21' Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done. ...

RE: [Maybe spam] Re: Relation of OS user to Informix database
Jonathan... am I correct in thinking that you can't revoke rights from a user who has those rights because they're a member of public? Ie, if they don't have the rights assigned with an explicit GRANT statement, then you can't revoke their rights without revoking public's rights and then granting permissions to all other users individually? Cheers Simon -----Original Message----- From: owner-informix-list@iiug.org [mailto:owner-informix-list@iiug.org] On Behalf Of Jonathan Leffler Sent: 25 August 2005 05:24 To: informix-list@iiug.org Subject: [Maybe sp...

OT: Text editors (was Re: Search and replace text in XML file?)
On Sat, Jul 28, 2012 at 6:29 PM, Mark Lawrence <breamoreboy@yahoo.co.uk> wrote: > I highly recommend the use of notepad++. If anyone knows of a better text > editor for Windows please let me know :) My current preference is SciTE, available on Linux and Windows both. It's configured using Lua, has lexers (and thus syntax highlighters and auto-indenters) for a huge list of languages (including Python, or I wouldn't mention it), and isn't RAM-hungry. It's not bug-free (but what isn't), and has a few limitations (eg it only really supports UTF-8), but I&...

RE: [Informix][Informix ODBC Driver] Database locale information mismatch
You could try issuing the following statement and see what the engine is configured for. onstat -g env This will give you the environment of the engine. I believe it is listed there what the locale is set to. David -----Original Message----- From: informix-list-bounces@iiug.org [mailto:informix-list-bounces@iiug.org] On Behalf Of bobkot@gmail.com Sent: Tuesday, May 23, 2006 7:28 AM To: informix-list@iiug.org Subject: [Informix][Informix ODBC Driver] Database locale information mismatch I have download ClientSDK 2.90.TC4 I am trying to connect to an IDS10 database. My ...

Web resources about - Re: Replace a carriage return in a text field - comp.databases.informix

Carriage - Wikipedia, the free encyclopedia
A carriage is a wheeled vehicle for people, usually horse-drawn; litters (palanquins) and sedan chairs are excluded, since they are wheelless ...

Carriage - Wikipedia, the free encyclopedia
A carriage is a wheeled vehicle for people, usually horse-drawn; litters (palanquins) and sedan chairs are excluded, since they are wheelless ...

Train Chartering - private First Class carriage from London - Flickr - Photo Sharing!
Train Chartering organises private carriages on scheduled train services throughout Europe, inclduing the UK. This is a First Class carriage ...

Self proclaimed "Dickhead" Horse Drawn Carriage Operator uses carriage as a weapon on cyclist - YouTube ...
Melbourne, 2:30pm, Saturday 6th December 2014. A horse drawn carriage operator becomes very rude and aggressive after I politely ask him to not ...

Cyclist films heated clash with horse-drawn carriage driver in CBD
A cyclist has recorded his run-in with a horse-drawn carriage operator on a busy Melbourne road.

Tram system jammed as old carriages fall apart
Melbourne needs 110 more new bumper-sized trams by 2020 to avoid chronic overcrowding as the city population soars and to compensate for the ...

Sydney Metro Northwest: Transport minister unveils life-size model of Metropolis carriage - DailyTelegraph ...
THIS is the first glimpse of Sydney’s new single-deck driverless trains that are set to run on the city’s new Metro network from 2019.

Catwalk in carriages: Fashion launch on Perth train
IT’S not a typical runway where you’d expect to find the latest fashions.

Catwalk in carriages: Fashion launch on Perth train - PerthNow Search Search
IT’S not a typical runway where you’d expect to find the latest fashions.

Swiss train carriage plunges into ravine
A landslide has derailed a passenger train in Switzerland sending one carriage plunging into a ravine.

Resources last updated: 2/27/2016 5:17:23 AM