Re: inserting chars at the beginning of a string?
Posted in 1998
Emma Kolstad Antunes wrote: > > I have a string, and I want to prepend 2 characters to it. Is there > a string function to do this? In sybase, I'd use "stuff", but I can't > find the equivalent in Informix. I'm sure the answer is right in front > of my nose, but I can't seem to find it. > > Thanks, > Emma In SQl (versions 7.1+) do this: SELECT 'xx'||mystring FROM mytable ...; In stored procedure language do this: LET mynewstring = 'xx'||mystring; In 4GL do this: LET mynewstring = 'xx', mystring -- Peter Lancashire Information Systems Specialist, Bayer plc Eastern Way, Bury St Edmunds, Suffolk, IP32 7AH, UK Tel: +44-1635-562258, Fax: +44-1635-562281 --- If all else fails, read the instructions AND the release notes. All opinions are my own and not those of Bayer plc. My Internet plumbing does not allow me to mail and post news together. Sorry. --- Join Infuse, the UK Informix User Group at http://www.infuse.org.uk/