binding column names

2004-07-06 Thread Guenter . Buehrle
Hi everybody, what I want to do is something like $dbh-prepare('UPDATE table SET ? = ? WHERE id=?'); $dbh-execute($column,$value, $id); The encountered problem relates to the bind-process of $column. As I suppose I have to explicitly call the bind_param-method the tell the driver not to quote

Re: binding column names

2004-07-06 Thread Michael Peppler
On Tue, 2004-07-06 at 08:33, [EMAIL PROTECTED] wrote: Hi everybody, what I want to do is something like $dbh-prepare('UPDATE table SET ? = ? WHERE id=?'); $dbh-execute($column,$value, $id); The encountered problem relates to the bind-process of $column. As I suppose I have to

Re: binding column names

2004-07-06 Thread Tony . Adolph
The prepare will fail. The db needs to know which column you want to update. You could do something like: my $sql = qq {UPDATE table SET $column = ? WHERE id=?}; $dbh-prepare($sql); $dbh-execute($value, $id); Cheers Tony

Re: DBI::ProxyServer in multi-threaded mode

2004-07-06 Thread Tim Bunce
On Mon, Jul 05, 2004 at 10:37:01PM +0100, John Escott wrote: OK, Tim's prompting (off list) has spurred me into action. I'm posting back to the list, just in case anyone else is interested. Thanks John. There's some good news and some bad news First the good news: setting mode to threads

Re: Describe table

2004-07-06 Thread PerlDiscuss - Perl Newsgroups and mailing lists
Hi You cannot use the DESCRIBE statement as it is. Try it in the following way select * from sys.user_tab_columns where table_name = 'TABLE_NAME'; Cheers Prabu Jimmy Jauhal wrote: Hi All, I am trying to execute a DESCRIBE table statement from my perl script that connects to an oracle

RE: Describe table

2004-07-06 Thread Helck, Timothy
I think in some cases it's better to use: select * from sys.all_tab_columns where table_name = 'TABLE_NAME' and owner = 'SCHEMA_NAME'; user_tab_columns will only show the tables of the current user. If your perl script will connect as a user who is not the owner of the table under

RE: Best Way to Auto Increment with Oracle

2004-07-06 Thread Helck, Timothy
It's not always convenient to use triggers to assign the primary key. Sometimes we want to know the primary key of a new record so we can use it to insert rows into a dependent table. Am I right to think that the following is nearly as efficient as a trigger-based approach? insert

RE: Best Way to Auto Increment with Oracle

2004-07-06 Thread Reidy, Ron
Comments below ... - Ron Reidy Senior DBA Array BioPharma, Inc. -Original Message- From: Helck, Timothy [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 06, 2004 7:52 AM To: Jared Still; Kipp, James Cc: Reidy, Ron; Jim; DBI List Subject: RE: Best Way to Auto Increment with

RE: Best Way to Auto Increment with Oracle

2004-07-06 Thread Ronald J Kimball
Reidy, Ron [mailto:[EMAIL PROTECTED] wrote: Am I right to think that the following is nearly as efficient as a trigger-based approach? insert into customer(customer_id, first, last) values(customer_id_seq.nextval, 'Homer', 'Simpson'); insert into address(address_id,

RE: Best Way to Auto Increment with Oracle

2004-07-06 Thread Helck, Timothy
-- OK, RETURNING is good, I can see where I might use that. -- Are you saying that currval cannot be relied upon to be the same as nextval without locking? My understanding is that it can be (though how it works is beyond me). -Original Message- From: Reidy, Ron [mailto:[EMAIL

Re: Describe table

2004-07-06 Thread Tim Bunce
I think in some cases it's better to use $sth = $dbh-column_info(...) :) Tim. On Tue, Jul 06, 2004 at 09:25:51AM -0400, Helck, Timothy wrote: I think in some cases it's better to use: select * from sys.all_tab_columns where table_name = 'TABLE_NAME' and owner = 'SCHEMA_NAME';

Re: Possible DBI logos

2004-07-06 Thread Jeff Zucker
Tim Bunce wrote: On Wed, Jun 02, 2004 at 05:28:21PM -0700, Jeff Zucker wrote: In honor of Tim Bunce's 40th birthday, here are some samples of possible DBI logos: http://www.vpservices.com/jeff/programs/dbi-logo/ Thanks Jeff. I'm think after something more plain and graphic. Yep, I agree. Mine

Re: Describe table

2004-07-06 Thread Sapet Frederic
On Tue, 6 Jul 2004 16:07:28 +0100 Tim Bunce [EMAIL PROTECTED] wrote: I think in some cases it's better to use $sth = $dbh-column_info(...) :) Tim. hi I am using Oracle 8.1.5 DBI 1.42 I tried to use this method like this : $sth = $dbh-column_info( undef,'OSNP', '%%' , '%%');

RE: Best Way to Auto Increment with Oracle

2004-07-06 Thread Reidy, Ron
Yes, I said that, but ... I was mistaken (so sorry and thanks to Ron Kimball for pointing this out to me). According to the Metalink note 108643.1, Once a sequence number is generated, the sequence number is available only to the session that generated the number. - Ron Reidy

HELP me in installing perl DBI for solaris 9

2004-07-06 Thread \Sundarrajan Raghavan\
Hi, I am using solaris 9 and I need some simplified instructions for installing perl DBI for oracle. I am NOT an unix admin and my unix admin says he is NOT a perl guy. I would appreciate if you could give me instructions for perl DBI install which I can forward to UNIX admin for getting

RE: HELP me in installing perl DBI for solaris 9

2004-07-06 Thread Reidy, Ron
As root, execute perl -MCPAN -e 'install Bundle::DBI'. If you haven't already done so, install the Oracle (client) software on your machine. Donwload DBD::Oracle from http://search.cpan.org/CPAN/T/TI/TIMB/DBD-Oracle-1.15.tar.gz and unpack it. Read the README files and follow the directions.

Re: DBD::Sybase and Text problems

2004-07-06 Thread dan_horne
Hey, thanks for that! Dan Michael Peppler [EMAIL PROTECTED] 06/07/2004 17:57 To: [EMAIL PROTECTED] cc: (bcc: Dan Horne/IT/AKLWHG/WHNZ) Subject:[SPAM]* Re: DBD::Sybase and Text problems On Tue, 2004-07-06 at 04:39, [EMAIL PROTECTED] wrote: My