Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Re: SQL vs Perl table comparing

by Anonymous Monk
on Jul 11, 2013 at 10:52 UTC ( #1043690=note: print w/replies, xml ) Need Help??

in reply to SQL vs Perl table comparing

Hi , Im working in ETL testing were i used to extract the data from Oracle 11g both Source and Target by running queries and put them result extracts into excel sheet and validate the same using excel macro . But i heard that , this can be done using python , perl , or Unix scripting . im looking forward suggestion / answers for my requirement . Any example script is welcome

Replies are listed 'Best First'.
Re^2: SQL vs Perl table comparing
by runrig (Abbot) on Jul 11, 2013 at 16:39 UTC

    You need to start learning one or more of those things you mentioned, try some things, and come back with a specific question (perl questions if you decided to go with perl). Also, it's not good form to cross-post without mentioning that you have cross-posted the question between forums.

    E.g., start learning perl, write something simple, come back with specific questions, learn how to use the DBI library to access data in databases, write something simple, and come back with more specific questions.

Re^2: SQL vs Perl table comparing
by roboticus (Chancellor) on Jul 11, 2013 at 11:46 UTC

    Something like this should do:

    use DBI; use Spreadsheet::WriteExcel; my $DB=DBI::connect( ... connection args for oracle DB ... ); my $ar = $DB->selectall_arrayref('select * from table'); my $XLWB = Spreadsheet::WriteExcel->new('table.xls'); my $XLWS = $XLWB->add_worksheet('table'); my $row = 0; $XLWS->write_row($row,0,$_) for @$ar;


    When your only tool is a hammer, all problems look like your thumb.

      Spreadsheet::WriteExcel is superceeded by Excel::Writer::XLSX.

      But I think the poster wants to avoid putting all the data in a spreadsheet where they currently run macros to compare data 8-) ... and wants you to write a generic table compare utility

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1043690]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (8)
As of 2018-03-18 17:54 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (230 votes). Check out past polls.