so after a simple ...
$db_fetched_long_val=~s/[[:cntrl:]]//g
... the string comparison worked.
Andy Crichton wrote:
You can simply select an oracle 'long' in the same way as a char type.
create table longtest (longfield long); insert into longtest values ('aaa'); insert into longtest values ('bbb');
$sth=$dbh->prepare('select * from longtest'); $sth->execute; while (my @row=$sth->fetchrow_array){ print $row[0] if $row[0] =~ /aaa/; }
-----Original Message----- From: praveen [mailto:[EMAIL PROTECTED] Sent: 06 January 2004 21:41 To: [EMAIL PROTECTED] Subject: handling oracle long data types
hi-
i have been using DBI along with DBD::JDBC for working with oracle databases.
i have an issue which i hope someone can help me with.
i need to select text that is stored as "long" in oracle 9i. now i want to compare that with a string that i read from a file. someone suggested that i can use to_lob() in sql and then use an oracle native procedure to compare values.
but i was wondering whether i can convert the value that i get from oracle into a string and be done with a simple =~. is tehre a way?
