Re: PostgreSQL book

2002-01-11 Thread Dave Rolsky
On Fri, 11 Jan 2002, Philip Molter wrote: > The only downside you're going to find are the down/upsides of > switching from MySQL to PostgreSQL. The DBI interface won't change > for you. My personal experience between the two databases is that > MySQL is easier to manage, easier to work with, a

Re: dbi and nulls

2002-01-11 Thread M.W. Koskamp
- Original Message - From: "Ronald J Kimball" <[EMAIL PROTECTED]> To: "M.W. Koskamp" <[EMAIL PROTECTED]> Cc: "Ronnie Anderson" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Friday, January 11, 2002 11:50 PM Subject: Re: dbi and nulls > On Fri, Jan 11, 2002 at 10:05:56PM +0100, M.W. Ko

Oracle 8.0.0 - LogMiner

2002-01-11 Thread Nguyen, David M
I have LogMiner setup and running on Oracle8.1.5 and try to set it up on Oracle8.0.0 but failed to run. If someone has it runs on Oracle8.0.0, please advise me how to set it up. Thanks, David

Re: dbi and nulls

2002-01-11 Thread M.W. Koskamp
- Original Message - From: "Ronnie Anderson" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, January 11, 2002 8:36 PM Subject: dbi and nulls > my $hosthandler = $dbh->prepare(q{ > SELECT id > FROM host > WHERE tid = ? > AND (domain = ? OR (? IS NULL AND domain IS NULL))

Re: SELECT

2002-01-11 Thread M.W. Koskamp
- Original Message - From: "Sterin, Ilya" <[EMAIL PROTECTED]> To: "'M.W. Koskamp '" <[EMAIL PROTECTED]>; "''Marius Keraitis ' '" <[EMAIL PROTECTED]>; "''DBI Perl ' '" <[EMAIL PROTECTED]> Sent: Friday, January 11, 2002 8:05 PM Subject: RE: SELECT > The list of columns you mean, that will

Re: dbi and nulls

2002-01-11 Thread Ronnie Anderson
I just figured it out. If $DOMAIN is NULL, I'm setting it to "undef" and then passing that in to the execute statement. It seems to be taking the _string_ "undef" instead of the _value_ of undef. So my query was doing "WHERE domain = 'undef'" instead of evaluating undef to NULL. I'll just wrap t

DB2 stored procedures and result sets

2002-01-11 Thread David Shrewsbury
Hello gang, Being rather new to stored procedures, can someone tell me if it is possible to call a DB2 procedure that generates a result set and then after the procedure call, somehow retrieve the rows of the result one at a time via the DBI interface? Can someone provide some sample DBI code to

Re: DBI and Oracle date comparison

2002-01-11 Thread Hardy Merrill
Jay, what is the difference between my way and your way - why does yours work and mine not? I can't seem much of a difference - only that you use "selectrow_array", and I use prepare/execute/ fetchrow_array. What am I missing? Jay Strauss [[EMAIL PROTECTED]] wrote: > You can do it like this: >

Re: dbi and nulls

2002-01-11 Thread Jeff Boes
On Fri, 11 Jan 2002 14:36:40 -0500 (EST) "Ronnie Anderson" <[EMAIL PROTECTED]> wrote: > my $hosthandler = $dbh->prepare(q{ > SELECT id > FROM host > WHERE tid = ? > AND (domain = ? OR (? IS NULL AND domain IS NULL)) > AND (subdom = ? OR (? IS NULL AND subdom IS NULL)) > AND (misc = ? OR (?

dbi and nulls

2002-01-11 Thread Ronnie Anderson
Forgive me if this is common knowledge, but I've searched and can't find the answer (I'm new to DBI). I'm trying to use NULL values with DBI, and have so far been unsuccessful. According to the help documentation: "Binding an undef (NULL) to the placeholder will not select rows which have a NULL

Re: RE: Oracle @name.sql Statements

2002-01-11 Thread Ali Zaidi
Here is part of the code that i have previously used to execute SQL scripts. I have just copied part of it here so dont try to run it as it is. But it should give u a good idea. use strict; use DBI; use IPC::Open3; use IO::Select; use POSIX ":sys_wait_h"; my $sqlplus = $ENV{ORACLE_HOME}.'/bin

RE: SELECT

2002-01-11 Thread Sterin, Ilya
The list of columns you mean, that will do if you use selectrow_array, and will equal to the number of columns, but the rows are not known until you fetch them all, so you must count. Ilya -Original Message- From: M.W. Koskamp To: Sterin, Ilya; 'Marius Keraitis '; 'DBI Perl ' Sent: 1/11/

RE: Can't locate object for module DBI in @INC !!

2002-01-11 Thread Sterin, Ilya
A simple perl Makefile.PL will not install, but rather just put together a Makefile. You must also run nmake install, but for that you must have a Visual C++ compiler installed. But because you are using Windows 2000, this is easily done with the utility that comes with it called PPM. You can l

Re: SELECT

2002-01-11 Thread M.W. Koskamp
- Original Message - From: "Sterin, Ilya" <[EMAIL PROTECTED]> To: "'Marius Keraitis '" <[EMAIL PROTECTED]>; "'DBI Perl '" <[EMAIL PROTECTED]> Sent: Friday, January 11, 2002 4:07 PM Subject: RE: SELECT > You would count as you itereate through the result set using a counter var. > You ca

Re: Column names and etc..

2002-01-11 Thread Bart Lateur
On Fri, 11 Jan 2002 09:07:15 -0500, Terrence Brannon wrote: >> You can do (very portable): >> >> my $sth = $dbh->prepare("SELECT * FROM $table"); > >its a shame that it is not just as portable to limit the result >set to 1 row... How about 0 rows? my $sth = $dbh->prepare("SELECT *

Can't locate object for module DBI in @INC !!

2002-01-11 Thread rada
hi all, I am trying to learn perl to do database applications with Oracle. I had installed Active prerl 5.6 version windows 2000, where i can work out sample scripts . Then i download DBI module v 1.2 to do database applications.I intalled it using by typing PERL Makefile.pl at com

Oracle DBD 1.12 test failure

2002-01-11 Thread William Lara
I am trying to upgrade Oracle DBD 1.06 to 1.12, and the make test is failing. The output file is attached. I am running Perl 5.005_03 I just upgraded the DBI to 1.20 without any problems This is being done on HP-UX 11.00 running on a K250. Please help, Willie make.test.TEST_VERBOSE.1 De

Re: DBI and Oracle date comparison

2002-01-11 Thread Jay Strauss
You can do it like this: #!/usr/bin/perl use DBI; use strict; my ($start,$end) = @ARGV; my $dbh=DBI->connect("dbi:Oracle:",'system','manager'); my $sql = q[ select '1' from dual where to_char(sysdate,'HH24') >= ? and to_char(sysdate,'HH24') < ? ]; my $count = ($dbh->sele

Re: Oracle @name.sql Statements

2002-01-11 Thread Gary Rich
The deadline solution is to taunt that person mercilessly for not knowing the difference between sql and oracle sqlplus commands. They should feel foolish and withdraw the request and you will meet the deadline. You can certainly open a file and include it's contents as an sql string, though no

RE: Oracle @name.sql Statements

2002-01-11 Thread Sterin, Ilya
No, this is a SQL plus command and not an SQL command. You will have to open the file yourself from the script and parse it while processing it with DBI. Another way to do it, is just open a pipe to sqlplus and run it from there. Ilya -Original Message- From: Jones Robert Contr TTMS Ke

Oracle @name.sql Statements

2002-01-11 Thread Jones Robert Contr TTMS Keesler
Is there a way in DBI/DBD to handle and deal with @name.sql statements? $xth=$dbh->do("@name.sql"); does not work. We're on an extremely tight deadline of today and I just got this. Robert E. Jones, BSCS, BSP 81 CS/SCK, Keesler AFB

AW: AW: AW: AW: Perl on W2K with ODBC and having trouble reading from thesameDSNtwice

2002-01-11 Thread Carsten Schäfer
The solution is: my $command = $DB->prepare( qq / SELECT "Given Name" FROM UserNDS /); Now everything is working! Carsten > -Ursprüngliche Nachricht- > Von: Jeff Seger [mailto:[EMAIL PROTECTED]] > Gesendet: Freitag, 11. Januar 2002 17:14 > An: Carsten Schäfer > Cc: [EMAIL PROTECTED]

Not quite OT yet Re: PostgreSQL book

2002-01-11 Thread jadams01
Mike Schienle <[EMAIL PROTECTED]> wrote: > I know there is a DBD module for PostgreSQL, but the table of > contents of the book don't mention it. Should I read anything into > that? I wouldn't. It's a huge book (636 pages), and there isn't any mention of Perl, or any other open source language,

Re: PostgreSQL book

2002-01-11 Thread Philip Molter
On Fri, Jan 11, 2002 at 10:20:16AM -0700, Mike Schienle wrote: : Hi all - : : I've been using DBI/DBD with Oracle, Informix and MySQL over the last : couple of years. I'm considering changing my MySQL DB's to PostgreSQL : DB's on my web server. O'Reilly just announced a new PostgreSQL book at : <

Oracle8.0 - LogMiner

2002-01-11 Thread Nguyen, David M
I have LogMiner setup and running on Oracle8.1.5 and try to set it up on Oracle8.0.0 but failed to run. If someone has it runs on Oracle8.0.0, please advise me how to set it up. Thanks, David

PostgreSQL book

2002-01-11 Thread Mike Schienle
Hi all - I've been using DBI/DBD with Oracle, Informix and MySQL over the last couple of years. I'm considering changing my MySQL DB's to PostgreSQL DB's on my web server. O'Reilly just announced a new PostgreSQL book at . I know there is a DBD module

AW: AW: AW: Perl on W2K with ODBC and having trouble reading from the sameDSNtwice

2002-01-11 Thread Carsten Schäfer
I installed 0.30 and tried several ways for the column name with space. my $command = $DB->prepare('SELECT NDS_Name, "Given Name" FROM UserNDS') ("SELECT NDS_Name, \"Given Name\" FROM UserNDS") ("SELECT NDS_Name, 'Given Name' FRO

DBI and Oracle date comparison

2002-01-11 Thread Hardy Merrill
Here's my query: SELECT TO_CHAR(SYSDATE, 'HH24') AS TIME FROM DUAL WHERE TO_CHAR(SYSDATE, 'HH24') >= ? AND TO_CHAR(SYSDATE, 'HH24') < ? The TO_CHAR(SYSDATE, 'HH24') produces 11, since the hour here now is 11. The 1st placeholder is for $start_time, which contains 5, and 2

RE: AW: AW: Perl on W2K with ODBC and having trouble reading from the sameDSNtwice

2002-01-11 Thread Ho, Frank
dbi-user group administrator: Could you tell me how to take my name off the e-mail distribution list? Thanks, Frank 919-546-4815 Raleigh, NC -Original Message- From: Carsten Schäfer [mailto:[EMAIL PROTECTED]] Sent: Friday, January 11, 2002 11:04 AM To: Jeff Seger Cc: [EMAIL PROTECTED

Re: Column names and etc..

2002-01-11 Thread Michael Peppler
Bart Lateur writes: > [beginners list snipped] > > On Fri, 11 Jan 2002 11:40:03 +0100, Marius Keraitis wrote: > > >Second step is to show every table contents (by clicking on link with table > >name). > >To do this I need to know how many columns is in table, and all names of columns > >

RE: DBI::AnyData question

2002-01-11 Thread Ron Hall
On Fri, 11 Jan 2002, Sterin, Ilya wrote: > Escaping with a backslash might become a problem later. Jeff and I talked > before, and not sure about his vision on this, I want SQL::Parser, which > comes with SQL::Statement, to become a universal SQL::Parser and therefore > possibly used by all DBDs

Re: AW: AW: AW: Perl on W2K with ODBC and having trouble reading from thesameDSNtwice

2002-01-11 Thread Jeff Seger
As I said before, I'm not an ODBC expert at all, so I'm not sure the answer to that. You may want to try 0.29 as the bug fix had to do with quoting. The "ugly solution" is to select * from the table and just pick the columns you want from the result set. If this is going to be a one time thing,

RE: DBI::AnyData question

2002-01-11 Thread Sterin, Ilya
Scott, if it's not too much trouble, can you send me the code, or let me know where I can download it if anywhere. Thanks. Ilya Sterin -Original Message- From: Scott T. Hildreth To: Sterin, Ilya Cc: Ron Hall; [EMAIL PROTECTED]; Simon Oliver; Ronald J Kimball Sent: 1/11/02 9:00 AM Subjec

AW: AW: AW: Perl on W2K with ODBC and having trouble reading from the sameDSNtwice

2002-01-11 Thread Carsten Schäfer
Jeff, I'´m using 0.28 I already tried to install 0.30 but the ppm-archive isn't updated yet. Carsten BTW, is a column name with space in name called "SQLSpecialColumns"? > -Ursprüngliche Nachricht- > Von: Jeff Seger [mailto:[EMAIL PROTECTED]] > Gesendet: Freitag, 11. Januar 2002 16:55 > A

RE: DBI::AnyData question

2002-01-11 Thread Scott T. Hildreth
I've been helping Tim with a preparser for DBI, which in his vision all the DBD's would use. Basically the Driver would tell the preparser what is acceptable for comments, placeholders, & escape chars and what to return for comments, placeholders, & escape chars. It is a hybrid of the dbd_prepar

Re: AW: AW: Perl on W2K with ODBC and having trouble reading from the sameDSNtwice

2002-01-11 Thread Jeff Seger
Alright I just took a quick peek at CPAN's website and saw that SQLSpecialColumns are supported starting with version DBD::ODBC 0.28 and there is a bug fix in version 0.29 for them. So if you are using version 0.27 or earlier, you may want to get the latest and greatest. See http://search.cpan

RE: DBI Handles

2002-01-11 Thread Sterin, Ilya
What do you mean by it telling you what those kids are. How can you possibly distinguish between them. Appending an SQL statement to one of it's attributes? Not sure what you want here. Ilya -Original Message- From: Mark Buckle To: Sterin, Ilya Cc: '[EMAIL PROTECTED]' Sent: 1/11/02 8:

RE: ORA-01722

2002-01-11 Thread Gordon . Dewis
If this is the exact statement: -8<- update test set col1 = 'abc', col2 = 'def', col3 = 'ghi', col4 = '120' where col1 = 'xyz' -8<- Then your problem likely stems from the fact that you're treating the value of col4 as a string rather than a number because you've surrounded it wit

RE: DBI::AnyData question

2002-01-11 Thread Sterin, Ilya
Escaping with a backslash might become a problem later. Jeff and I talked before, and not sure about his vision on this, I want SQL::Parser, which comes with SQL::Statement, to become a universal SQL::Parser and therefore possibly used by all DBDs and possibly DBI iteself, for any SQL parsing nee

RE: DBI Handles

2002-01-11 Thread Mark Buckle
Statement handles. DBI has a Kids attribute, but no way of telling what those kids are. Which seems kind of strange. You could maintain your own, but then it seems to me you'd possibly have to wrap the relevant parts of the DBI with your own classes. And, sorry, this was intended for the dbi-use

AW: AW: Perl on W2K with ODBC and having trouble reading from the same DSNtwice

2002-01-11 Thread Carsten Schäfer
> Carsten Schäfer wrote: > > > In NDS there are some tables with names like "Given Name". > > How can I prepare a SELECT statement with space in the colum name? I've > > tried \"Given Name\", 'Given Name', [Given Name] and {Given Name}. > > Any idea? > > Carsten > Actually, what happens if you ju

Re: DBI::AnyData question

2002-01-11 Thread Ron Hall
On Fri, 11 Jan 2002, Simon Oliver wrote: > > According to the docs Simon quoted, for DBD::AnyData > Actually, it's due to SQL::Statement which is used by a number of DBD modules > including DBD::AnyData and DBD::CSV It is what I thought. > > > you need to escape a > > single quote with

RE: SELECT

2002-01-11 Thread Sterin, Ilya
You would count as you itereate through the result set using a counter var. You can also run a select count(*) query before the actual query and fetch from that. Ilya -Original Message- From: Marius Keraitis To: DBI Perl Sent: 1/11/02 6:43 AM Subject: SELECT hi, How could i know how

Re: DBI::AnyData question

2002-01-11 Thread Simon Oliver
> According to the docs Simon quoted, for DBD::AnyData Actually, it's due to SQL::Statement which is used by a number of DBD modules including DBD::AnyData and DBD::CSV > you need to escape a > single quote with a backslash, not with another single quote, as you would > for most other DBDs. Whic

Re: DBI::AnyData question

2002-01-11 Thread Simon Oliver
> $FORM{location} =~ s/\'/\'\'/g; > doesn't seem to work. Because the escape chracter for SQL::Statement is \ not ' as the docs explain. > $loc = $dbh->quote("$FORM{location}"); > > Generates and error in the web logs. > > Can't call method "quote" on an undefin

RE: ORA-01722

2002-01-11 Thread Sterin, Ilya
This is because one of the fields is numeric, and you are quoting it, or inserting text into a numeric field, possibly. If you used placeholders, you would of prevented this error. Ilya -Original Message- From: Koen Gogne To: dbi_users Sent: 1/11/02 1:24 AM Subject: ORA-01722 hi, I'm

Re: DBI::AnyData question

2002-01-11 Thread Ronald J Kimball
On Fri, Jan 11, 2002 at 09:46:21AM -0500, Ron Hall wrote: > On Fri, 11 Jan 2002, Simon Oliver wrote: > > > Sorry, I assumed you had read the docs and were still having problems. > > I did and I am still having problems :) > > > the offending value is passed in from an web form >

Re: DBI::AnyData question

2002-01-11 Thread Ron Hall
On Fri, 11 Jan 2002, Simon Oliver wrote: > Sorry, I assumed you had read the docs and were still having problems. I did and I am still having problems :) the offending value is passed in from an web form so this hand patching is not the answer. doing

Re: DBI::AnyData question

2002-01-11 Thread Simon Oliver
Sorry, I assumed you had read the docs and were still having problems. >From SQL::Statement man pages Strings Surrounded by either single or double quotes; some characters need to be escaped with a backslash, in particular the backslash itself (\\), the NUL byte (\0), Line feeds (\n), Carriag

Re: Column names and etc..

2002-01-11 Thread eingb
On 11 Jan 2002, at 9:07, Terrence Brannon wrote: > > On Friday, January 11, 2002, at 07:09 AM, Bart Lateur wrote: > > > [beginners list snipped] > > > > On Fri, 11 Jan 2002 11:40:03 +0100, Marius Keraitis wrote: > > > >> Second step is to show every table contents (by clicking on link > >> with

RE: install DBI on HP-UX 11.0

2002-01-11 Thread LBaxter
Read the README.hpux file that is in the DBD-Oracle cpan module (attached for your convenience) -Original Message- From: Sergey Nitsulenko [mailto:[EMAIL PROTECTED]] Sent: Friday, January 11, 2002 3:03 AM To: [EMAIL PROTECTED] Subject: install DBI on HP-UX 11.0 Hello, Can You help me

Re: Column names and etc..

2002-01-11 Thread Terrence Brannon
On Friday, January 11, 2002, at 07:09 AM, Bart Lateur wrote: > [beginners list snipped] > > On Fri, 11 Jan 2002 11:40:03 +0100, Marius Keraitis wrote: > >> Second step is to show every table contents (by clicking on link >> with table >> name). >> To do this I need to know how many columns is i

Re: DBI::AnyData question

2002-01-11 Thread Ron Hall
On Fri, 11 Jan 2002, Simon Oliver wrote: > Some example code/data might help. There is not much to see - doing an SQL insert with a ' character in one of the fields causes a DBI error. So I need to know how to escape the ' character. Again I'm using DBI::AnyData

Re: DBI::AnyData question

2002-01-11 Thread Simon Oliver
Some example code/data might help. -- Simon Oliver Ron Hall wrote: > > I'm Trying to get test with a ' in it into a CSV defined catalog > in DBI::AnyData > > Thw nefarious s/\'/\'\'/ does seem to work and > > $loc = $dbh->quote($FORM{location}); > >

DBI::AnyData question

2002-01-11 Thread Ron Hall
I'm Trying to get test with a ' in it into a CSV defined catalog in DBI::AnyData Thw nefarious s/\'/\'\'/ does seem to work and $loc = $dbh->quote($FORM{location}); also does not seem to work Any help would be appreciated. HTH

SELECT

2002-01-11 Thread Marius Keraitis
hi, How could i know how many rows is selected after: $oraSQL = qq/SELECT table_name, column_name column_id FROM all_tab_columns/; then I use fetchrow_array(..). Thankfull for help..:) MarioDaPL.

Perl on W2K with ODBC and having trouble reading from the same DSN twice

2002-01-11 Thread Carsten Schäfer
Dear all, I'am new to this list and want to say hello first. I've written an easy ActiveState Perl script which will read from Novell NDS (neccessary Novell ODBC Driver installed) and put these records into a MS Access Database thru ODBC, too. The first I read the NDS-Users and this works good.

install DBI on HP-UX 11.0

2002-01-11 Thread Sergey Nitsulenko
Hello, Can You help me install DBI without gcc? I have cc and aCC on server HP-UX 11.0. -- # /opt/perl/bin/perl -v This is perl, v5.6.1 built for PA-RISC1.1-thread-multi (with 1 registered patch, see perl -V for more detail) # pwd /tmp/DBI-1.

Re: [Fwd: CSV SQL Statements]

2002-01-11 Thread Christopher J. Crane
Below is a snippet of my code with your suggestion on using CLIKE. The problem is that now this SQL statement: "SELECT ProductLineName,PartNumber FROM SiliconBridgeRectifers WHERE ProductLineName CLIKE '$form{'ProductLine'}%'" returns everything in the database. Am I doing something wrong here? I

Re: Column names and etc..

2002-01-11 Thread Bart Lateur
[beginners list snipped] On Fri, 11 Jan 2002 11:40:03 +0100, Marius Keraitis wrote: >Second step is to show every table contents (by clicking on link with table >name). >To do this I need to know how many columns is in table, and all names of columns >in table. You can do (very portable):

RE: Column names and etc..

2002-01-11 Thread Siiskonen, Pekka
Not a real Perl/Oracle hacker, but try if the select clause below produces the data you need: === select OWNER, TABLE_NAME, COLUMN_ID, COLUMN_NAME, DATA_TYPE, DATA_LENGTH, NULLABLE from all_tab_colu

Column names and etc..

2002-01-11 Thread Marius Keraitis
Hi, I have a problem with getting colunm count and their names. I have to get the list of all tables in the users account (Oracle). This I do by selecting * from cat. Second step is to show every table contents (by clicking on link with table name). To do this I need to know how many columns is

Re: [Fwd: CSV SQL Statements]

2002-01-11 Thread Simon Oliver
Hi Jeff, how about this? The "LIKE" operator accepts the '%' and '_' wildcards, where '%' matches any string of 0 or more characters and '_' matches any single character. Sets and Ranges of the form [FfBb] and [a-z] are not supported. The "CLIKE" operator works exactly the same

Re: [Fwd: CSV SQL Statements]

2002-01-11 Thread Christopher J. Crane
Wow...this is great newsI will try the CLIKE function tonight. - Original Message - From: "Jeff Zucker" <[EMAIL PROTECTED]> To: "Simon Oliver" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; " Christopher J. Crane" <[EMAIL PROTECTED]> Sent: Thursday, January 10, 2002

Re: [Fwd: CSV SQL Statements]

2002-01-11 Thread Simon Oliver
"Christopher J. Crane" wrote: > > Below is a snippet of my code with your suggestion on using CLIKE. The > problem is that now this SQL statement: > "SELECT ProductLineName,PartNumber FROM SiliconBridgeRectifers WHERE > ProductLineName CLIKE '$form{'ProductLine'}%'" > > returns everything in the

ORA-01722

2002-01-11 Thread Koen Gogne
hi, I'm having this strange problem on my Oracle8 DB when using the DBI: I want to update some table 'test' with discription : col1 varchar2(255) col2 varchar2(255) col3 varchar2(255) col4 number(8) when I try to perform following update-statement update test set col1 = 'abc', col2 = 'def', col3