| stroncococcus 2006-12-06, 7:18 pm |
| Hy!
I have a problem inside a little Perl script, where I try to do a
casting inside a SQL statement.
my $mature_link_update = $dbh->prepare("UPDATE mature_mirna SET
loop_links = loop_links || CAST (ARRAY[?] AS interger[] WHERE
mat_accession=?");
or
my $mature_link_update = $dbh->prepare("UPDATE mature_mirna SET
loop_links = loop_links || (CAST (? AS interger[]) WHERE
mat_accession=?");
gives me the error:
"ERROR: syntax error at or near "WHERE" at character 75"
How do I use those CAST's exactly?
The primary problem, why I wanted to do this, was that perl didn't do
those casts.
$dbh->prepare("UPDATE mature_mirna SET loop_links = (loop_links ||
ARRAY[?]) WHERE mat_accession=?");
with
$mature_link_update-> execute(int($loop_ta
ble_id), $mat_accession);
gave me the error
operator does not exist: integer[] || text[]
Perhaps someone knows here a solution, too?
Best regards,
Kai
|