DBI - copying tables - a better way?

2004-03-11 Thread Mark Martin
Hi, bin using DBI for a while for data warehousing type stuff and up till now I've had to change data on the fly as it moves from one database to another : my $sql01 = qq{SELECT FIELD01 .FIELDn FROM PRODUCTION_TABLE}; my $sql02 = qq{INSERT INTO DATAWAREHOUSE VALUES (?,?,?); my

RE: DBI - copying tables - a better way?

2004-03-11 Thread Andy Crichton
The best way of copying a table in oracle is by creating a database link and Usine the CREATE TABLE AS syntax CREATE TABLE $table_name AS SELECT * from [EMAIL PROTECTED] Andy -Original Message- From: Mark Martin [mailto:[EMAIL PROTECTED] Sent: 11 March 2004 09:22 To: [EMAIL

(Fwd) RE: DBI with ORACLE encryption

2004-03-11 Thread Tim Bunce
- Forwarded message from [EMAIL PROTECTED] - Delivered-To: [EMAIL PROTECTED] Subject: RE: DBI with ORACLE encryption To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] From: [EMAIL PROTECTED] Date: Thu, 11 Mar 2004 12:06:29 +0530 Hi, We have an application which gives a corba interaface.

Re: DBI with ORACLE encryption

2004-03-11 Thread jayashree . sundaram
Hi, We have an application which gives a corba interaface. We have written a perl script to pull data out of the interface and dump the same to the Oracle database. All we do with oracle is to take an database connection using DBI of the format $dbh = DBI-connect ('', $user_id, $password,

Re: DBI - copying tables - a better way?

2004-03-11 Thread Hardy Merrill
If your goal is just to make an exact copy of a table to a table with a different name, you may not need DBI for that. I just did this a few weeks ago in Oracle - this is from memory and may not be quite right, but you'll hopefully get the idea: create table table_b as (select * from table_a)

Re: DBI - copying tables - a better way?

2004-03-11 Thread Mark Martin
thanks everybody - sometimes you dig yourself into hole when a simpler solution is staring you in the face. If anybody has cracked a method of inserting into column names held in an array, data that is also held in an array - I'd be interested for future reference - for now I'll be linking

Re: DBI - copying tables - a better way?

2004-03-11 Thread Jeff Zucker
Mark Martin wrote: my $fields = join(', ', @cols); my $values = join(', ', @rows); $sql02 = qq{INSERT INTO DATA__WAREHOUSE($cols) VALUES ($rows)}; Shouldn't $sql02 be using $fields and $values instead of $cols and $rows? And why not just grab the column names from $sth-{NAME} after a dummy

Re: DBI - copying tables - a better way?

2004-03-11 Thread Mark Martin
Bjorn, Yes, I had thought of that and the impact on disk space/fragmentation of constant drops and creates. I've actually run into another problem possibly to do with global names - my insert loks like this : insert into TESTTABLE select * from [EMAIL PROTECTED] The SID.DOMAIN.COM is what I

How to connect Oracle 9i (Windows )

2004-03-11 Thread Mahi.G
Hai I am working on Redhat Linux system with Perl. But I want to connect with Oracle 9i database in my Network. But The Oracle is installed in Windows System. Is it possible to connect the Oracle 9i by using Perl script. If possible pls guide me ( I am new for database connection ). If u

RE: How to connect Oracle 9i (Windows )

2004-03-11 Thread Zhang, George
Yes, it is possible to connect to Oracle on Windows (actually, it doesnot matter what OS oracle runs on since Oracle takes care of network communication). You need to install Oracle client on your linux system. The doc here is very helpful:

RE: How to connect Oracle 9i (Windows )

2004-03-11 Thread Hardy Merrill
Zhang, George [EMAIL PROTECTED] 03/11/04 10:03AM Yes, it is possible to connect to Oracle on Windows (actually, it doesnot matter what OS oracle runs on since Oracle takes care of network communication). You need to install Oracle client on your linux system. The doc here is very helpful:

Problems installing DBD::mysql

2004-03-11 Thread Michael R. Pierotti
Network Blitz I am having some problems installing DBD::mysql and was wondering if anyone had any idea why I am getting the error listed below. #---# Which drivers do you want to install? 1) MySQL only 2) mSQL only

Installation problems

2004-03-11 Thread Pyro3k
I am getting the following error when trying to install Bundle::DBD::mysql or DBD::mysql. Any ideas as to why ? Unsuccessful stat on filename containing newline at /usr/lib/perl5/5.8.0/ExtUtils/Liblist/Kid.pm line 97.Unsuccessful stat on filename containing newline at

[Fwd: Re: ANNOUNCE: DBI 1.42 release candidate 2 for testing]

2004-03-11 Thread Jeff Zucker
[sent to Tim rather than the list by mistake] ---BeginMessage--- David Wheeler wrote: /usr/local/lib/perl5/site_perl/5.6.1/i386-freebsd/BerkeleyDB.pm line 1388, DATA line 23. That directory wasn't in the @INC you sent yesterday. Something odd is going on. -- Jeff ---End Message---

DBI iThreads

2004-03-11 Thread Arnold, Hugh
I want to spin off $sth-execute() just this statement into a thread, so I can perform other tasks while the database is preparing the results of my query. Like: my $sth=$dbh-prepare(...); my $thread=async{$sth-execute()}; ...do other stuff for a while...

identifier too long?

2004-03-11 Thread Laurie Vien
I am on the very last step of my Perl script. Have read a bunch of records into arrays, using a 'select table handler' with DBI. Now I want to cycle back through the data in those arrays, and based on the value of one specific field, update a field in the corresponding database record. Because

NEVER MIND - RE: identifier too long?

2004-03-11 Thread Laurie Vien
Never mind, folks--sorry for the interruption. I tried just putting the SQL command--array element and all--into the do statement, and got rid of the $sql_cmd variable, and it worked. I guess you can take those error messages literally sometimes ... -Original Message- From: Laurie

RE: identifier too long?

2004-03-11 Thread Andy Hassall
I am on the very last step of my Perl script. Have read a bunch of records into arrays, using a 'select table handler' with DBI. Now I want to cycle back through the data in those arrays, and based on the value of one specific field, update a field in the corresponding database record.

Re: identifier too long?

2004-03-11 Thread Jeff Zucker
Laurie Vien wrote: I am on the very last step of my Perl script. Congrats! $sql_cmd = \UPDATE Chunkmail SET Contribute_flag=1 WHERE Chunkmail_ID= . @contribute_flag[$_] . \; $rslt = $dbh-do($sql_cmd); Try: $sql_cmd = q{ UPDATE Chunkmail SET Contribute_flag=1 WHERE

Re: Problems installing DBD::mysql

2004-03-11 Thread Rudy Lippan
Network Blitz I am having some problems installing DBD::mysql and was wondering if anyone had any idea why I am getting the error listed below. unset LANG; # should take care of your problem. And it looks like you are using an old version of DBD::mysql. Rudy