Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Re: Re: CONCAT Perl or SQL

by Itatsumaki (Friar)
on Dec 03, 2003 at 15:38 UTC ( [id://311925]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: CONCAT Perl or SQL
in thread CONCAT Perl or SQL

my $sql = " UPDATE ICD_9_Disease_Types SET ICD_9_code = CONCAT('A', ICD_9_code) WHERE ICD_9 > 0"; my $sth = $dbh->prepare($sql) or $dbh->errstr(); my $rows_updated = $sth->execute(); print "We updated $rows_updated rows\n";

Replies are listed 'Best First'.
Re: Re: Re: Re: CONCAT Perl or SQL
by Win (Novice) on Dec 03, 2003 at 16:17 UTC
    I don't think that CONCAT works with MS SQL Server. I have tried the following that does not give any error message but does not do what I want either.
    my $sqlB = "update ICD_9_Disease_Types set ICD_9_code = ('A') + IC +D_9 FROM ICD_9 WHERE ICD_9 > 0"; my $sthG = $dbh->prepare($sqlB) or $dbh->errstr(); my $rows_updated = $sthG->execute(); print "We updated $rows_updated rows\n";

    It gives the message:

    We updated 0E0 rows

    I am not really sure what the OEO refers to.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://311925]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (8)
As of 2024-03-28 09:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found