Urgent
Posted in 1999
Topics: General Discussion
Hello All I am a newbie to Informix 7.2 but familiar with Oracle. Is there an equivalent for SUBSTR function in Informix? I need to trim the first four characters from the values stored in a column. Also I need to convert any character which is not alphanumeric(/:, etc.) to a hyphen. Any Ideas??? Nadella Sent via Deja.com http://www.deja.com/ Share what you know. Learn what you don't.
l_nadella@yahoo.com wrote: > I am a newbie to Informix 7.2 but familiar with Oracle. Is there an > equivalent for SUBSTR function in Informix? I need to trim the first > four characters from the values stored in a column. Also I need to > convert any character which is not alphanumeric(/:, etc.) to a hyphen. > Any Ideas??? Not in 7.2; you need 7.3 to get the Oracle-style functions. -- Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net) Guardian of DBD::Informix v0.60 -- see http://www.perl.com/CPAN #include <disclaimer.h>
Select x[5,field lenght] from table ............ Use "[", start position , end position , "]" for substrings For character replacement I use 4GL , for x = 1 to length(char field) if field[x,x] = "?" then let field[x,x] = "-" enf if enf for Mariusz l_nadella@yahoo.com wrote in article <7kp8mh$o0u$1@nnrp1.deja.com>... > Hello All > I am a newbie to Informix 7.2 but familiar with Oracle. Is there an > equivalent for SUBSTR function in Informix? I need to trim the first > four characters from the values stored in a column. Also I need to > convert any character which is not alphanumeric(/:, etc.) to a hyphen. > Any Ideas??? > > Nadella
In article <37705AA2.3F22@earthlink.net>, Jonathan Leffler <jleffler@earthlink.net> writes: > l_nadella@yahoo.com wrote: > >> I am a newbie to Informix 7.2 but familiar with Oracle. Is there an >> equivalent for SUBSTR function in Informix? I need to trim the first >> four characters from the values stored in a column. Also I need to >> convert any character which is not alphanumeric(/:, etc.) to a hyphen. >> Any Ideas??? > > Not in 7.2; you need 7.3 to get the Oracle-style functions. > You can do 'select textcolun[1,4] from table' to get the first four characters.
l_nadella@yahoo.com wrote: > > Hello All > I am a newbie to Informix 7.2 but familiar with Oracle. Is there an > equivalent for SUBSTR function in Informix? I need to trim the first > four characters from the values stored in a column. Also I need to > convert any character which is not alphanumeric(/:, etc.) to a hyphen. > Any Ideas??? > > Nadella > > Sent via Deja.com http://www.deja.com/ > Share what you know. Learn what you don't. Use "trim"...