If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > replacing part of string

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-07-04, 06:07
sp3ctre sp3ctre is offline
Registered User
 
Join Date: Aug 2004
Posts: 3
Question replacing part of string

Hi all,

I didn't know whether to post this under informix or SQL, so sorry if it is in the wrong place.

I have a field in my database which contains a file path i.e. c:\temp\docs\1.doc

Somewhere along the line some of the records have ended up like c:\temp\\docs\1.doc

I need to "find and replace" the double backslashes with single ones, but I can't work out how to do it using wildcards. Can anyone help me out here please?

Many thanks
Reply With Quote
  #2 (permalink)  
Old 11-09-04, 13:01
artemka artemka is offline
Registered User
 
Join Date: May 2004
Location: New York
Posts: 248
If you have 4gl I would do a simple little program
have a for loop and parce thrue the string that you select from the table
and if you find \\ take one \ out and complete the rest of the string

you can do the same in the stored procedure
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On