Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

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


Comment on Re: SQL vs Perl table comparing
Re^2: SQL vs Perl table comparing
by roboticus (Canon) 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;

    ...roboticus

    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

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.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (6)
As of 2014-12-20 06:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (95 votes), past polls