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 > How to replace a character of data field

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-26-04, 05:05
ajewahar ajewahar is offline
Registered User
 
Join Date: May 2004
Posts: 2
How to replace a character of data field

Hi,
How can I replace a charcter of "column/field" in the table.

I have column in the table called "Ref". I need to relplace the character ":" with NULL or SPACE if the Ref column contain char ":".

For example, if "Ref" column contain value of "abc:xyz", I need to replace ":" with NULL or SPACE. I need to do this from DBaccess or ISQL mode.

I'm looking any funcitons like "REPLACE" which is available in SQL Server.

Appreciate if you could provide any sample or source code to acheive this may be thru a Stored Procedure/routine etc..

Regards,
Reply With Quote
  #2 (permalink)  
Old 05-26-04, 05:39
iaguigon iaguigon is offline
Registered User
 
Join Date: May 2004
Location: Barcelona, Spain
Posts: 54
Function REPLACE(string, replaced_substring, new_substring) exists in IDS too. You can include something like replace( string,':',' ') in your dbaccess statements or in spl.

Iņaki
Reply With Quote
  #3 (permalink)  
Old 05-26-04, 06:18
ajewahar ajewahar is offline
Registered User
 
Join Date: May 2004
Posts: 2
hi thanks.. great help mate
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