Re: decode function in sql
Posted in 1997
}>From ilist@rmy.emory.edu Tue Apr 29 21:01:42 1997 }>Received: from rmy.rmy.emory.edu by hobbes.dbintellect.com via ESMTP (940816.SGI.8.6.9/930416.SGI.AUTO) }> for <settler@dbintellect.com> id VAA22327; Tue, 29 Apr 1997 21:01:41 -0600 }>Received: (from ilist@localhost) by rmy.rmy.emory.edu (8.7.1/8.7.1) id TAA22687 for informix-list-out; Tue, 29 Apr 1997 19:10:01 -0400 (EDT) }>From: salsbury@mdsintl.com }>Message-Id: <33667050.6954@mdsintl.com> }>Subject: decode function in sql }>Date: Tue, 29 Apr 1997 15:04:00 -0700 }>Reply-To: salsbury@mdsintl.com }>Organization: ftn Internet }>Sender: informix-list-owner@rmy.emory.edu }>To: informix-list@rmy.emory.edu }>X-Informix-List-Id: <news.37292> }> }>We have text information in some varchar columns. It is medical data and }>therefore frequently contains < or > symbols. Our problem is that when }>we try to extract this information and write it to our web application }>(we are using javascript), the < > are interpreted as html synbols. }>Oracle has a decode function where one can search for a string and }>replace it. Does anyone know if Informix has a similar function? There's }>nothing glaringly obvious in the sql manual. }> }>Thanks in advance, }>Sue }> You could write a stored procedure that interrogates the column and strips out the <> prior to returning the query answer set. ------------------------------------------------------------------- Jeff Craig | dbINTELLECT Technologies, Inc. Senior Consultant | Golden, CO | (303) 275-6954 ext. 8008 | email: settler@dbintellect.com | fax: (303) 275-2134 -------------------------------------------------------------------