I am more an Oracle user than Sybase, so please excuse my short comings with regards to Sybase.
I am extracting data from a sybase (System 11) table that contains a field with text information. The text can contain linefeeds and carriage returns (Char(13) + Char(10)), and so when I run an ISQL script these linefeeds corrupt the output.
I would like to replace these with a different character during my export, but I can not get the charindex function to select on this.
For example:
set nocount on
declare @t varchar(255), @lf varchar(2), @msg varchar(255)
select @lf = char(13) + char(10)
select @t = "Hello " + @lf + "World"
print @t
select @msg = 'Linefeed at ' + convert(char(2),charindex(@t,@lf))
print @msg
produces:
Hello
World
Linefeed at 0
Any idea how I do this?
I would like to do the Oracle equivalent of replace(text,chr(13)||chr(10),' ')
Thanks
Kerry
I am extracting data from a sybase (System 11) table that contains a field with text information. The text can contain linefeeds and carriage returns (Char(13) + Char(10)), and so when I run an ISQL script these linefeeds corrupt the output.
I would like to replace these with a different character during my export, but I can not get the charindex function to select on this.
For example:
set nocount on
declare @t varchar(255), @lf varchar(2), @msg varchar(255)
select @lf = char(13) + char(10)
select @t = "Hello " + @lf + "World"
print @t
select @msg = 'Linefeed at ' + convert(char(2),charindex(@t,@lf))
print @msg
produces:
Hello
World
Linefeed at 0
Any idea how I do this?
I would like to do the Oracle equivalent of replace(text,chr(13)||chr(10),' ')
Thanks
Kerry