Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

Long time ago, i wrote something to transfer database table from Informix to Oracle, i used a spinner. It may help you.

sub transfer_Data { my $stn = shift; my $dtn = shift; $| = 1; my @spinner = ('|','/','-','\\'); my $ifmx_stmt = "select count(*) from $stn" ; my $sth_ifmx = $db_ifmx->prepare($ifmx_stmt); $sth_ifmx->execute; my $count = $sth_ifmx->fetchrow(); print "Total record number: $count \n\n"; $ifmx_stmt = "select * from $stn" ; $sth_ifmx = $db_ifmx->prepare($ifmx_stmt); $sth_ifmx->execute; my $rn = 1; while ( my @row = $sth_ifmx->fetchrow_array ) { my $ds = ''; for ( my $i = 0; $i <@row; $i++ ) { my $nd = trim($row[$i]); $nd =~ s/'/''/g; my $check = match_DateList($i); if ( $check ) { $ds .= "to_date('$nd', 'MM/DD/YYYY'),"; } else { $ds .= "'$nd',"; } } $ds =~ s/,$/)/; $ds =~ s/^/(/; my $orac_stmt = "insert into $dtn values " . $ds ; my $sth_orac = $db_orac->do($orac_stmt); print "Record: $rn $spinner[$rn%4]\r"; $rn++; } $sth_ifmx->finish; print "\nData Transfer is complete \n\n"; $| = 0; }
It may be too much. That is what i have.

Edit by tye

In reply to Re: making a spinner by perlisfun
in thread making a spinner by archen

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 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 chanting in the Monastery: (3)
As of 2022-06-29 05:55 GMT
Find Nodes?
    Voting Booth?
    My most frequent journeys are powered by:

    Results (94 votes). Check out past polls.