Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
Thank you. I add more information:

    * Your hardware configuration and environment.
    	My client host : ,and the SqlServer DB server: .They located at some place. 
    * Your disk system(s).
      My client host HD:300G. 
    * Your database engine's configuration.
    	DB is charged by our DBA.I really don't know what's config you means
    * The structure of your database instance (definition of tables, indices, and objects).
    	Table Definition:
    	test_c (ID int not null,cust_id int not null,status char(1) null,money decimal(12,2) null)
      no indices 	
    * The nature of the data you are inserting.
      My data is from my client host's sqlite DB  
    * The client script you use to access your database. 
My Code :
#!/usr/bin/perl use strict; use warnings; use DBI; my $mydbh = DBI->connect( "dbi:SQLite:/root/loc.db","","",{AutoCo +mmit => 0} ) or die "Error $DBI::errstr \n"; my $dbh = DBI->connect( "dbi:Sybase:server=;databa +se=customer", "xxx", "xxx", {AutoCommit =>1}) or die $DBI::errstr; insert_it(); $mydbh->disconnect; $dbh->disconnect; exit; ########################## sub insert_it() { my $r = get_data(); for (keys %$f) { my $mo = $r->{$_}->{money}; my $status= $r->{$_}->{status}; $dbh->do(qq{insert into test_c(custid,money,status) values + ($_,'$mo','$status')}) or die $DBI::errstr; } } sub get_data { my %data; my $sth = $mydbh->prepare(qq{select custid,money,status from tem +p_test order by custid}); my ($cid,$mon,$sta); $sth->execute() or die $DBI::errstr; $sth->bind_columns(undef, \$cid, \$mon, \$sta); while ( $sth->fetch() ) { $data{$cid} = {money => $bal, status => $sta}; } return \%data; }
I have tried the placeholder method,but the sqlserver 2K doesn't support it.

In reply to Re^2: How many record insert into SqlServer 2K per second? by pysome
in thread How many record insert into SqlServer 2K per second? by pysome

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?

What's my password?
Create A New User
Domain Nodelet?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2023-05-30 21:39 GMT
Find Nodes?
    Voting Booth?

    No recent polls found