Home » Databases » Sybase » ASE » 35381: SQL::Translator::Parser::DBI::Sybase needs to strip the carriage return from stored procs/views sql

35381: SQL::Translator::Parser::DBI::Sybase needs to strip the carriage return from stored procs/views sql

35381: SQL::Translator::Parser::DBI::Sybase needs to strip the carriage return from stored procs/views sql

Centos 5
Linux dba-dev1 2.6.22.9-default #1 SMP Mon Oct 1 11:26:48 CDT 2007 i686
athlon i386 GNU/Linux

Perl v5.8.8 built for i386-linux-thread-multi
SQL::Translator::0.09000

Sybase ASE will often store the SQL text for stored procedures and views
with the carriage return embedded (\r). We need to strip that out else
we will receive “^M” in the output.

diff Sybase_orig.pm Sybase_new.pm
108a109
<div class="message-stanza-depth-1">>
</div>
109a111,112
<div class="message-stanza-depth-1">>       $stuff->{view}->{$_->[0]}->{text} =~ s/\r//g
>               if (defined ($stuff->{view}->{$_->[0]}->{text}));
</div>
155a159,161
>       $stuff->{procedures}->{$_->[0]}->{text} =~ s/\r//g
>               if (defined ($stuff->{procedures}->{$_->[0]}->{text} ));
>
Share Button

Leave a Reply

Your email address will not be published. Required fields are marked *

*
*

Facebook login by WP-FB-AutoConnect