Computing.Net > Forums > Database > ODBC Interface for Perl or Python?

ODBC Interface for Perl or Python?

Reply to Message Icon

Original Message
Name: SNYP40A1
Date: May 21, 2007 at 14:48:14 Pacific
Subject: ODBC Interface for Perl or Python?
OS: WinXP
CPU/Ram: P4 @ 3.4 GHz w/ 2MB Cache
Model/Manufacturer: ME!!
Comment:

I want to automate a process that I perform on a weekly basis for my job. Currently, I have a bunch of SQL scripts that I run through JMP, a comprehensive, but expensive statistical suite. This works, but I still have to copy and paste the output of the JMP tables into an Excel sheet which is tedious. I know Perl, C++, Python, SQL, and some Java. It would be nice if there was a way to connect to the Oracle database and have Perl run my SQL scripts. After running the SQL scripts, I need to do some basic statistics, computing the 80-th quantile, median, average, etc for some of the columns. But my main problem is connecting to the database through Perl or Python, I am not sure how to do this as JMP uses Microsoft's built-in ODBC database connector tool. Would I be better off with Java? Thoughts?


USE YOUR TURN SIGNALS AND PAY ATTENTION WHEN THE LIGHT TURNS GREEN.


Report Offensive Message For Removal

Response Number 1
Name: FishMonger
Date: May 22, 2007 at 17:23:46 Pacific
Subject: ODBC Interface for Perl or Python?
Reply: (edit)

If you want to use Perl, you'll be using the DBI module. I don't recall if it already includes the Oracle driver, but if it doesn't, you'd also need to install the DBD::Oracle module.

Here is the documentation on how to use the modules.
http://search.cpan.org/~timb/DBI-1....
http://search.cpan.org/~pythian/DBD...


Report Offensive Follow Up For Removal

Response Number 2
Name: FishMonger
Date: May 22, 2007 at 17:27:45 Pacific
Subject: ODBC Interface for Perl or Python?
Reply: (edit)

If you want to use the ODBC driver instead, then you'd use the DBD::ODBC module.

http://search.cpan.org/~jurl/DBD-OD...


Report Offensive Follow Up For Removal

Response Number 3
Name: SNYP40A1
Date: May 23, 2007 at 19:01:22 Pacific
Subject: ODBC Interface for Perl or Python?
Reply: (edit)

FishMonger,
Thanks for the help. I will try to use DBD::ODBC module through ActivePerl. I cannot think of a better language for this than Perl, if I have overlooked a better choice, let me know.


Report Offensive Follow Up For Removal

Response Number 4
Name: Razor2.3
Date: May 26, 2007 at 20:09:18 Pacific
Subject: ODBC Interface for Perl or Python?
Reply: (edit)

What about VBA? It's included with MS Office and it should do everything you want, including automatically editing your Excel sheet.


Report Offensive Follow Up For Removal







Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: ODBC Interface for Perl or Python?

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software