Re: how to post

2010-04-29 Thread Jeff Zucker
On Wed, Apr 28, 2010 at 7:11 PM, Pam Wampler wrote: > How do I post a question to this forum? > > Not unlike the way you posted that one :-). -- Jeff > > > > > Thanks, > > > > Pam Wampler > > Senior Oracle Database Administrator > > Advanced Call Center Technologies, LLC. > > 3035 Boones Cree

Re: DBD::CSV: perl script to read CSV file does not work

2008-06-02 Thread Jeff Zucker
$ret = $dbh->do("UPDATE info SET Owner = 'me' WHERE SerialNumber = '1234") or die "update: " . $dbh->errstr(); print "update returned $ret"; -- $ret always has value 0E0. On 6/2/08, Prakash Prabhakar

Re: DBD::CSV: perl script to read CSV file does not work

2008-06-01 Thread Jeff Zucker
ReneeB wrote: Why do you use the Windows line endings as the default? Why not the value of $/? Because 1) the module was already several years old and widely used when I inherited it and I didn't want to break backward compatability 2) Because, I think using $/ would be a disaster since you

Re: DBD::CSV: perl script to read CSV file does not work

2008-05-31 Thread Jeff Zucker
le was created on windows or mac or with something other than '\012' as the line ending, using "\n" on linux will not work. -- Jeff --- On Sun, 6/1/08, Jeff Zucker <[EMAIL PROTECTED]> wrote: From: Jeff Zucker <[EMAIL PROTECTED]> Subject: Re: DBD::CSV: perl

Re: DBD::CSV: perl script to read CSV file does not work

2008-05-31 Thread Jeff Zucker
Prakash Prabhakar wrote: I am using the following code in my .cgi progam (compiling with perl-5.8.6, UNIX OS). It doesnt work. Could you please let me know what could be wrong? I do not get any warnings/error messages/expected output. The .cgi and the .csv are in the same directory. My guess i

Re: Need help with aggregate functions and queries that return zero records

2008-03-04 Thread Jeff Zucker
Hi Ashok, MJD also found that bug. I've fixed it but not uploaded the new version yet because I'm fixing a couple of other things. You can apply this patch yourself if you need it soon: Changing line 1189 of SQL/Statement.pm like so fixes it: - $rows = $g->calc; + $rows = $g->calc || [];

Re: dbd::csv with col_names but insert / delete / update fail

2007-12-31 Thread Jeff Zucker
aclhkaclhk wrote: I have a csv file. I defined the column names inside the perl script but "sql insert" does not work. That's because you defined the column names for a table called "passwd" and then tried to do an insert on a table called "b". You need to define the column names for the tabl

Re: Cursors (foiled again)

2007-12-04 Thread Jeff Zucker
[EMAIL PROTECTED] wrote: On Dec 3, 6:37 pm, [EMAIL PROTECTED] (Jeff Zucker) wrote: [EMAIL PROTECTED] wrote: It's been a while since I did dbi, but I used to be quite proficient. Now I'm back to it. What I want to do is read a flat file that has a column value in it, do a sel

Re: Cursors (foiled again)

2007-12-03 Thread Jeff Zucker
[EMAIL PROTECTED] wrote: It's been a while since I did dbi, but I used to be quite proficient. Now I'm back to it. What I want to do is read a flat file that has a column value in it, do a select on the database to find a corresponding column value and then modify the flat file record based on th

Re: New edition of the Cheetah?

2007-11-30 Thread Jeff Zucker
Hi Brian, Here's where we stand: $cheetah = $dbh->prepare(q{ SELECT chapters FROM book WHERE author = ? AND coauthor = ? }); ... # <--- you are here ... # <-- this interval is unknown no matter what the website says ... # $cheetah->execu

Re: DBD::CSV: make test fails

2007-10-15 Thread Jeff Zucker
Robert Roggenbuck wrote: The DBD::Adabas-error comes during the tests t/20createdrop, t/30insertfetch, t/40bindparam, and then I stopped going though the others. The message is exactly the same in every test. If these are Jeff Zucker's private tests, there is something wrong with the package.

Re: DBD::CSV: make test fails

2007-10-12 Thread Jeff Zucker
My guess is that you are either missing some prerequisites or that the older linux perl has some old copies of them. Try to first install the latest DBD-File, SQL::Statement, and Text::CSV_XS. If you still get errors, please let me know what versions of those modules you have. Good luck! -

Re: Next patch for SQL::Statement

2007-10-12 Thread Jeff Zucker
Hi Jens, Thank you for all the work you have put in to SQL::Statement, it sounds like great work. I have known for a long time that the joins could be improved and I'm glad that you did it. I'm unfortunately at a very busy time personally - with two major site launches coming up this month

Re: Bugs / Performance-Issues of SQL::Statement

2007-09-10 Thread Jeff Zucker
Hi Jens, Thanks much for the patches. I'll look into them as soon as possible and presumably add them to a new release soon thereafter. I'm happy to discuss your other ideas. Unless they're DBI specific, though, we should probably do that off-list. -- Jeff [EMAIL PROTECTED] wrote: Hi J

Re: Connecting to Progress Database

2007-08-16 Thread Jeff Zucker
There seems to be no *progress* on this list since the last time someone asked about a DBD for *progress* (not postgres), someone also mentioned DBD::Pg. Progress is a commercial RDBMS and if there's a DBD for it, I haven't seen one. -- Jeff Alexander Foken wrote: There is DBD::Pg, available

Re: question about SQL Parser

2007-06-25 Thread Jeff Zucker
Hi, Felipe Maribel wrote: I have installed this application to parse SQL queries, but it doesn't work with the query I try to, it is to say, the parser doesn't match the query I send it. That is because my query has sentences like 'mydb.dbo.mytable' The parser currently won't break on foo.bar s

Re: (Fwd) DBI's method for reading [row x,field y]

2007-02-27 Thread Jeff Zucker
Bob Hunter wrote: The list is dead. Forwarding the message to the list is like dropping it in the bin. If you do not care meeting user's problems, then why should I care using DBI in the first place? I have your book, it is verbose, but it does not answer to key questions. Either you write a bett

Re: Problems using the DBI class to access CSV files.

2007-01-23 Thread Jeff Zucker
Curtis Leach wrote: I've been using the DBI class for a while now & I'm trying to port some code from a Windows environment where it is working perfectly to a Unix environment where it's not really working. I've also reviewed the Perl DBI book again & see nothing about this type of problem.

Re: New here. dbi:DBM:mldbm=Storable;f_dir=/foo/bar. Inserts when asked to update and other weirdness

2006-09-17 Thread Jeff Zucker
Lane wrote: my $dbh = DBI->connect('dbi:DBM:mldbm=Storable;f_dir=./foo'); Yes, there does appear to be a bug in DBD::DBM update when the key field is updated. I'll look into it. In the meantime, since you said that you are only prototyping, you can use Temporary tables which are not effected

Re: New here. dbi:DBM:mldbm=Storable;f_dir=/foo/bar. Inserts when asked to update and other weirdness

2006-09-16 Thread Jeff Zucker
Lane wrote: my $dbh = DBI->connect('dbi:DBM:mldbm=Storable;f_dir=/foo/bar'); $dbh->{RaiseError} = 1; I can't reproduce your problem. Please run the following script and send the output back to the list. #!/usr/bin/perl -w use strict; use DBI; my $dbh = DBI->

Re: DBI::PurePerl and DBD::Oracle...

2006-08-29 Thread Jeff Zucker
Lincoln, Adym wrote: Hi all, Just trying to understand the instructions on both these packages. The main thing to understand is that DBI::PurePerl is meant to work only with DBDs that are pure Perl (have no C/XS component) and AFAIK, that does *not* include DBD::Oracle. You might be able

Re: (Fwd) [perl #40244] req:regarding support for BerkeleyDB

2006-08-28 Thread Jeff Zucker
You can use DBD::SQLite to access SQLite and DBD::DBM to access BerkeleyDB. For fullest access to BerkeleyDB you'll also need MLDBM and SQL::Statement. DBD::DBM comes with DBI, all the other mentioned modules are available on CPAN under their own names. -- Jeff Tim Bunce wrote: - Forwa

Re: DBI to BerkeleyDB?

2006-08-25 Thread Jeff Zucker
ManKyu Han wrote: I moved "prepare" outside loop, so DBD::DBM (BerkeleyDB) works almost twice faster (100 -> 200 /sec) but compare to BerkeleyDB, it is still slower. Since DBD::DBM is now using BerkeleyDB, shouldn't it perform as well as BerkeleyDB ?? (or at least not as bad as what I got?) If

Re: DBD-DBM too slow

2006-08-23 Thread Jeff Zucker
ManKyu Han wrote: Hi. I installed DBD::DBM through cpan and everything seems fine. I wanted to benchmark DBD::DBM's performance, so I did simple test. I populate table that I created with 20 integer and strings. In mysql, it was going almost 7000 inserts / sec but in DBD::DBM, the best I co

Re: blank spaces in a variable in perl

2006-08-18 Thread Jeff Zucker
The topic of this list is DBI, the perl database interface. Questions not related to that module do not belong on this list. Try http://www.perlmonks.org/ or news://comp.lang.perl.misc and give some sample code so people can figure out what you are talking about. Is this perhaps for the web?

Re: problems to connect to a mysql-database

2006-07-10 Thread Jeff Zucker
CAMPBELL, BRIAN D (BRIAN) wrote: One problem I see is this: Your Windows path delimiters act as escape chars in Perl. A couple of solutions: Double up the backslashes, e.g. "...:c\\programme\\xamapp\\..." Use single quotes to disable interpolation of escape chars: '...:c\programme\xamapp\..

Re: execute/quote issue...

2006-05-31 Thread Jeff Zucker
Mason Loring Bliss wrote: $sth->execute($dbh->quote($key)); Don't do that. Either use the quote() method or use placeholders, never both. -- Jeff

Re: perl- dbi

2006-05-31 Thread Jeff Zucker
Jonathan Leffler wrote: You've received a few workable answers - but there's a better one. perl -MDBI -e 'print "$DBI::VERSION\n"' This tells you which version of DBI you have installed - which can be even more valuable than simply knowing that DBI is installed. Similarly: perl -MDBD::Oracle

Re: DBD::XBase, STDOUT, and IO issue

2006-05-11 Thread Jeff Zucker
Tim Bunce wrote: On Thu, May 11, 2006 at 08:59:25AM -0400, Mark Galbreath wrote: Tim, I have preactically memorized the docs I have read them so many times. If you have a better suggestion, I am wide open for it! Something simple would do: $sth = $dbh->prepare(...);

Re: DBI versiion

2006-04-05 Thread Jeff Zucker
Jie Zhang wrote: I tried perl -MDBI -e "DBI->installed_versions" I got : Can't locate auto/DBI/installed_v.al in @INC (@INC contains: The installed_versions() method was added to DBI in version 1.38, August 2003 so the fact that you got an error means that you have a version before 1.38 and

Re: DBI versiion

2006-04-05 Thread Jeff Zucker
Michael Nhan wrote: print $DBI::VERSION,"\n"; Of for much more info: perl -MDBI -e "DBI->installed_versions" -- Jeff Date: Wed, 05 Apr 2006 13:43:30 -0700 From: Jie Zhang <[EMAIL PROTECTED]> To: dbi-users@perl.org Subject: DBI versiion Hi, We're using oracle 8 and 9. I have code

Re: [Fwd: DBD::AnyData & dbish]

2006-01-06 Thread Jeff Zucker
Scott T. Hildreth wrote: I am missing something here (probably a few brain cells), how do I set up the dsn for DBD::AnyData (fixed format) when using dbish? Well, it's rather messy because dbish's execution of perl is a bit messy. But it works fine. Try this: 1)

Re: SQL::Statement parsing

2005-10-26 Thread Jeff Zucker
John Cougar wrote: IMHO, the API would be neater is it contained "parse_ok()" method - or something similar - to provide an explicit test for successful parsing, without having to enquire against errstr() as a (almost) side-effect. I think the best thing is for me to follow DBI and have an er

Re: DBI::Statement parsing

2005-10-26 Thread Jeff Zucker
John Cougar wrote: Heya DBI-Users Can anyone help a DBI::Statement newbie with the following problems: Not that it matters, but the module is called SQL::Statement, not DBI::Statement. 1. When parsing a SQL string, is there a preferred way for initially testing whether the statement did

Re: Trouble with SQL::Statement 1.14 and bind values

2005-10-07 Thread Jeff Zucker
Steffen G. wrote: Hi, I have some trouble with the new SQL::Statement 1.14 when using a DBI:CSV database and bind values. Yes, I just recently discovered some problems. Please try this fix and let me know if it solves your problem: http://svn.perl.org/modules/SQL-Statement/trunk/SQL-Stateme

Re: Subclassing the DBI (really corrected example, last time I swear)

2005-09-30 Thread Jeff Zucker
Tim Bunce wrote: On Fri, Sep 30, 2005 at 09:25:31AM -0700, Jeff Zucker wrote: Tim Bunce wrote: Did you remove this line on purpose? $b = q{NULL} unless defined $b; Yeap. quote() on an undef returns NULL How polite of it! Thanks. And as long as I'm asking - is th

Re: Subclassing the DBI (really corrected example, last time I swear)

2005-09-30 Thread Jeff Zucker
Tim Bunce wrote: On Thu, Sep 29, 2005 at 10:49:48AM -0700, Jeff Zucker wrote: package MyDbi; use base 'DBI'; package MyDbi::db; use base 'DBI::db'; sub prepare { my($self,@connect_args) = @_; return bless $self->SUPER::prepare(@connect_args), 'MyDbi::st&

Re: Subclassing the DBI (really corrected example, last time I swear)

2005-09-29 Thread Jeff Zucker
Sorry, not enough coffee this morning, I forgot to use the DBD's quote, dub^9. package MyDbi; use base 'DBI'; package MyDbi::db; use base 'DBI::db'; sub prepare { my($self,@connect_args) = @_; return bless $self->SUPER::prepare(@connect_args), 'MyDbi::st'; } package MyDbi::st; use base

Subclassing the DBI (corrected example)

2005-09-29 Thread Jeff Zucker
Oops, the SUPER::execute() and error check should happen before the reconstruction: package MyDbi; use base 'DBI'; package MyDbi::db; use base 'DBI::db'; sub prepare { my($self,@connect_args) = @_; return bless $self->SUPER::prepare(@connect_args), 'MyDbi::st'; } package MyDbi::st; use

Re: Subclassing the DBI - any good examples?

2005-09-29 Thread Jeff Zucker
Tim Bunce wrote: I'm interested to hear stories of people who have subclassed the DBI, or used modules that subclass the DBI. Just as a simple example, how evil is this?: package MyDbi; use base 'DBI'; package MyDbi::db; use base 'DBI::db'; sub prepare { my($self,@connect_args) = @_;

Re: ANNOUNCE:: DBIx::MyParse 0.20

2005-09-21 Thread Jeff Zucker
Bart Lateur wrote: On Sun, 11 Sep 2005 12:38:07 +0300, Philip Stoev wrote: * Provide the same interface to Postgresql's parser the way it is being done for MySQL, and at that time "My" in MyParse will no longer stand for MySQL. That sounds like the worst idea for a module name ever.

Re: RFC : AJAX + DBI = DBIx::LiveGrid

2005-09-16 Thread Jeff Zucker
Martin J. Evans wrote: Jeff, The $order parameter is required if $rows is specified. Ah, yes, of course, thanks for spotting that. To confirm, does it scroll correctly when you do specify an order (i.e. by clicking on a column heading to toggle ordering by that column)? If it does then

RFC : AJAX + DBI = DBIx::LiveGrid

2005-09-14 Thread Jeff Zucker
I've created a module that marries DBI with AJAX to support LiveGrids - dynamically updateable portions of web pages that work like google maps. As you scroll through the grid, the contents are buffered on the client-side, and limited on the server-side and only small sections are refreshed at

Re: Memoizing non-place-holding sql statements to place-holding

2005-08-22 Thread Jeff Zucker
[EMAIL PROTECTED] wrote: >I'm dealing with: > >INSERT INTO MyTbl (col1,record_ts,col2) > VALUES (7,CURRENT TIMESTAMP,'o''brian') }; > That calls for a combination of SQL::Statement and your method. You have to trick SQL::Statement into thinking that "CURRENT TIMESTAMP" is a string (because

Re: Memoizing non-place-holding sql statements to place-holding

2005-08-22 Thread Jeff Zucker
[EMAIL PROTECTED] wrote: >>> my @new_values = (); >>> my @place_holders = >>> map { >>> if (/^CURRENT TIMESTAMP$/) { >>> $_; >>> } else { >>> push @new_values => $_; >>> "?"; >>> } >>> } @args >>> ; >> > >SQL::Statement can do this? > Yes. The snippet I sent before will automatically turn #1 into

Re: Memoizing non-place-holding sql statements to place-holding

2005-08-21 Thread Jeff Zucker
Greg Sabino Mullane wrote: there are some modules out there that attempt to deconstruct SQL commands that might be adapted to the task As, for example SQL::Statement which would catch a few things your hack wouldn't - e.g. embedded escaped quotes in values, or INSERT statements that don't spe

Re: SQL::Statement questions

2005-08-20 Thread Jeff Zucker
Michael Hirmke wrote: Hi *, I have a few questions regarding SQL::Statement: The first one probably can only be answered by the quthor himself That's me. : Will SQL::Statement be able to understand the "ALTER" command in the future Yes but not any time soon unless someone wants to collabo

Re: SQL-Statement-1.14

2005-08-11 Thread Jeff Zucker
H S wrote: Hi, I am trying to install SQL::Statement through cpan but got some errrors while 'make tests' One of the errors said that I am missing IO::File. IO::File is part of perl 5.8.7 whereas my perl's version is 5.8.3. Do I need to upgrade to newer version? You can safely ignore the

Re: case insensitive selects

2005-07-24 Thread Jeff Zucker
Radomir Hejl wrote: Hello, does DBD::CSV supports the following select clause? select * from table where upper (col1) like '%ab%'; Yes that syntax is supported, although, I think you might want LOWER (col1) instead of UPPER since the example you show will never find any matches. Also, BTW

Re: RFC on other database wrapper modules

2005-07-21 Thread Jeff Zucker
Darren Duncan wrote: the focus or sole content of my Lightning Talk (assuming it is accepted) will be to introduce my 'Rosetta' plus 'SQL::Routine' modules I'm looking forward to it. Beginning DBI users at OSCON might also consider attending my tutorial "The Basics of Perl DBI", given on Mon

OT: Re: Help : Pass by reference to another file using Nohup ?

2005-05-16 Thread Jeff Zucker
This list is for discussion of DBI, not perl in general. If you have general perl questions, please use news://comp.lang.perl.misc or http://www.perlmonks.org. That said, you can either do Calledfunc($tempvar->{name}); sub Calledfunc { my($name)[EMAIL PROTECTED]; } Or else: Calledfunc($temp

Re: UTF8 in CSV (was Re: select through DBD::CSV)

2005-05-15 Thread Jeff Zucker
Radomir Hejl wrote: Why doesn't LIKE operator match the data when encoding pragma (any) is used? I followed your advice and used DBD::AnyData but the symptoms are the same - no match with encoding pragma (iso-8859-2) and like operator. Yes, you're right. I'm sorry, I originally made that

UTF8 in CSV (was Re: select through DBD::CSV)

2005-04-24 Thread Jeff Zucker
Radomir Hejl wrote: Why doesn't LIKE operator match the data when encoding pragma (any) is used? I'm pretty clueless about encoding, but essentially, Text::CSV_XS, the CSV parser under DBD::CSV, treats utf data as binary and just passes it back and forth as bytes. Since it's done in C, it doesn'

Re: DBD::DBM slow key retrievals....

2005-04-09 Thread Jeff Zucker
Jim Lambert wrote: Hi Jeff, I'm still having a few problems. I tried 1.11, but the key lookups are still doing full file reads. Moving on to 1.12, I was happy to see the key lookups worked great, but I got unexpected results from queries. Yep, another bug, thanks much for finding it and for

Re: DBD::DBM slow key retrievals....

2005-04-08 Thread Jeff Zucker
Jim Lambert wrote: Jeff, I just realized, I forgot to include the output you requested in my last response, so here it is: SQL::Statement 1.005 Yikes! No wonder. That version is almost three years old. It was written long before I introduced the primary key optimizations. I'm about to rel

Re: DBD::DBM slow key retrievals....

2005-04-07 Thread Jeff Zucker
Jim Lambert wrote: I tried placeholders, but my query did not return any results with them. Try this short script and send me the results. If this script succeeds and your placeholders, fail, please send me an example of your use of placeholders. #!perl -w $|=1; use strict; use DBI; my $dbh = D

Re: DBD::DBM slow key retrievals....

2005-04-07 Thread Jeff Zucker
Hi Jim, I'm using DBD::DBM, and the queries I think should be quick and based on the dbm key are taking forever and my strace output confirms that the whole dbm file is being searched. You really should be using placeholders, not using them is slowing you down considerably since it means the sta

Re: new emulation experiment - module on module

2005-04-05 Thread Jeff Zucker
Darren Duncan wrote: The first module I'll attempt this with is SQL::Statement. I'm just in the middle of a spate of releases of this module (two in the last two weeks and another coming in a day or two) after an intense several months of development. If you fork today instead of next week, you

Re: DBD::CSV much slower on osX ?

2005-04-01 Thread Jeff Zucker
Charles Plessy wrote: As I had better to spend my time on analysing some data with my script rather than analysing the script itself, I eventually swiched to DBI::SQLite, which solved my problem by performing the query in a few seconds. There's no question, SQLite is faster than DBD::CSV fo

Re: adding key to DB object

2005-03-29 Thread Jeff Zucker
Brandon Metcalf wrote: Can someone explain why I can't do the following: print $dbh; $dbh is a blessed object, printing it or even using Data::Dumper on it will get you no joy. $dbh->{commitflag} = 1; print "commitflag is $dbh->{commitflag}"; $dbh attributes must be either a) upper-c

Re: (Fwd) DBI support for executing SQL scripts

2005-03-25 Thread Jeff Zucker
- Forwarded message from Qaseem Shaikh <[EMAIL PROTECTED]> - I have been looking for ways to run .sql files on a MySQl database via DBI. The DBI::Shell distribution includes dbish, a program which can run SQL against any DBI accessible database either interactively or in batch mode. And I

Re: Anyone getting blank messages from the list?

2005-03-23 Thread Jeff Zucker
Reidy, Ron wrote: yes For the past couple of days, I have been getting blank messages from Kim Nielsen [EMAIL PROTECTED] every time I post to dbi-users. Anyone else? Ok, I've written to the postmaster. So far only response is another blank message :-). -- Jeff

Anyone getting blank messages from the list?

2005-03-23 Thread Jeff Zucker
For the past couple of days, I have been getting blank messages from Kim Nielsen [EMAIL PROTECTED] every time I post to dbi-users. Anyone else? -- Jeff

Re: printing query results

2005-03-23 Thread Jeff Zucker
Brandon Metcalf wrote: j == [EMAIL PROTECTED] writes: j> Brandon Metcalf wrote: j> >Hm. The documentation says it's experimental, but the version I have j> >seems to be broken altogether. There is no new() method in the j> >DBI::Format package in the code and I get in the following error: j> > j>

Re: printing query results

2005-03-23 Thread Jeff Zucker
Brandon Metcalf wrote: Hm. The documentation says it's experimental, but the version I have seems to be broken altogether. There is no new() method in the DBI::Format package in the code and I get in the following error: You don't declare a new DBI::Format object, you create a new DBI::Format::F

Re: printing query results

2005-03-23 Thread Jeff Zucker
Brandon Metcalf wrote: Does DBI have a print method similar to the print in the old Pg.pm interface? With the old print method I could print out query results as they would appear if I ran the query directly with the column names and column widths according to value widths, etc. Do I have to roll

Re: Newline characters in DBI:CSV

2005-03-21 Thread Jeff Zucker
Steffen G. wrote: I have a problem with text containing newline characters when using DBI:CSV. I put in a string containing a newline and I get back a string containing "\n". What am I doing wrong? Nothing. It's a bug. As this problem is similar to a bug I've found few months ago, which Jeff could

Re: NULLs in Text::CSV_XS and DBD::CSV

2005-03-16 Thread Jeff Zucker
Jeff Zucker wrote: 1,,2 1,"",2 In case I was unclear: the first is three fields with the second field NULL, the second is three fields with the second field an empty string. -- Jeff

Re: NULLs in Text::CSV_XS and DBD::CSV

2005-03-16 Thread Jeff Zucker
Ronald J Kimball wrote: Jeff Zucker [mailto:[EMAIL PROTECTED] wrote: Yes, currently Text::CSV_XS returns empty string for both empty strings and NULLs. I am considering providing an option to differentiate the two and return undef for NULLs. How do you distinguish between empty string and

Re: NULLs in Text::CSV_XS and DBD::CSV

2005-03-16 Thread Jeff Zucker
Jeff Zucker wrote: I forgot to mention that DBD::AnyData (which also handles CSV and "pipe delimited" formats) returns undef for NULL, so if you use DBD::AnyData or plain AnyData you can get the undefs you want. Using plain AnyData, this will generate use of unitialized value warnin

NULLs in Text::CSV_XS and DBD::CSV

2005-03-16 Thread Jeff Zucker
Ronald J Kimball wrote: CAMPBELL, BRIAN D (BRIAN) [mailto:[EMAIL PROTECTED] wrote: I'm guessing that when a field is empty in your CSV file, then the method $csv->fields puts an empty string value (e.g. "") in the corresponding element in your @data array (not an undef value). Yes, currentl

Re: formatting and parsing a colon-delimited MS Access .LDB (Locked Database) file

2005-03-14 Thread Jeff Zucker
Jeff Zucker wrote: Willis, Frank A wrote: With slight modifications it could handle the data you describe. Just look at AnyData::Format::Paragraph. And if it works for you, rename it AnyData::Format::LDB and submit it to CPAN or submit to me and I'll include it (with you as author) in a f

Re: formatting and parsing a colon-delimited MS Access .LDB (Locked Database) file

2005-03-14 Thread Jeff Zucker
Willis, Frank A wrote: Perl dbi users: (This task might be able to be done independent of the DBI). I am trying to format and parse a colon-delimited MS Access .LDB (Locking Database) file out to a .csv file DBD::AnyData includes a "paragraph" format that supports "vertical" records that lo

Re: Using Perl DBI, DBD package, and SQL to open an .odb file?

2005-03-10 Thread Jeff Zucker
Willis, Frank A wrote: Is there any way to use the Perl DBI and SQL to open an .odb file? This lists a number of possibilities: http://filext.com/detaillist.php?extdetail=odb&Submit3=Go%21 The most likely one is OpenOffice.Org Database. If so, I'd check their site to find the format, it may

Re: New DBI in-memory tables, heterogeneous operations, SQL-Statement

2005-02-27 Thread Jeff Zucker
Hi Paul, Paul Boutros wrote: Hi Jeff, I'm on: AIX 5.2.0.0 Perl 5.8.0.0 DBI 1.46 I get an error on make test with: ... SQL ERROR: Bad predicate: 'id'! Yes, sorry, I've fixed that and a few other bugs, and Dean has added some more code. The SQL::Statement::Functions pod is much expanded and

New DBI in-memory tables, heterogeneous operations, SQL-Statement

2005-02-26 Thread Jeff Zucker
[cc to dbi-dev but please reply to dbi-users or to me] I'm making available a pre-release version of SQL::Statement with many new features including vastly improved parens parsing (thanks Dean Arnold), column aliases (thanks Robert Rothenberg), new built-in functions including SOUNDER() and REGE

New User-Defined Function Syntax in SQL::Statement

2005-02-21 Thread Jeff Zucker
[Copied to dbi-dev, but please reply to dbi-users] Since the cat is out of the bag on upcoming SQL::Statement changes, here's a preview. Comments on the proposed syntax will be much appreciated. The major additions will be column name aliases (thanks Robert Rothenberg), improved parsing (thanks

Re: Possible bug in SQL-Statement: reports Bad predicate: '^1^'

2005-02-21 Thread Jeff Zucker
Dean Arnold wrote: How timely... Jeff Z. and I are working on a SQL-Statement update that should fix your paren problems, plus provide a few more new features, so stay tuned. And speaking of which, let me publicly thank Dean for pitching in on SQL::Parser and Robert Rothenberg and Dan Wright for

Re: Possible bug in SQL-Statement: reports Bad predicate: '^1^'

2005-02-21 Thread Jeff Zucker
Jon Warbrick wrote: The problem appears to be that the current version of SQL-Statement (1.09) can't parse SELECT col FROM tbl WHERE ((c1 = 1 OR c1 = 2) AND c2 = 1) Yes, the module has some problems with certain kinds of parenthetical statements, I'm working on it. In particular, it doesn't l

Re: DBD::CSV much slower on osX ?

2005-02-16 Thread Jeff Zucker
[EMAIL PROTECTED] wrote: Total Elapsed Time = 63.19465 Seconds User+System Time = 43.46465 Seconds Exclusive Times %Time ExclSec CumulS #Calls sec/call Csec/c Name 66.5 28.91 36.463 109445 0.0003 0.0003 SQL::Statement::eval_where I'm the maintainer of DBD::CSV and while I don't have time

Re: encoding pragma aborts script

2005-01-23 Thread Jeff Zucker
RH wrote: Hi, I have an app which connects via DBI:DBD:CSV to a flat file. When I include pragma use encoding, Ah, ok I found it. This patch to DBD::File fixes it. 533c533 < sprintf('(?:%s|%s¦%s)', --- sprintf('(?:%s|%s|%s)', In other words, change line 533 in File.pm to look like the se

Re: encoding pragma aborts script

2005-01-23 Thread Jeff Zucker
RH wrote: I have an app which connects via DBI:DBD:CSV to a flat file. When I include pragma use encoding, the app aborts (message from OS and the script is killed). I found out that script is aborted during execute method of DBI. The DB file has only ASCII characters. I use pragma encoding to disp

Re: DBD::CSV and joins

2005-01-14 Thread Jeff Zucker
Jeff Benton wrote: Sorry if I posted this twice - I did not see my first post go through. I am trying to do a join across to csv files but have been unsuccessful up to this point. ... I get the following: Use of uninitialized value in concatenation (.) or string at /usr/local/share/perl/5.8.4/SQ

Re: Evaluated "require $database" not found.

2004-12-27 Thread Jeff Zucker
Ron Wingfield wrote: A practical example of a business application might be illustrated by a manufacturing operation spread over multiple cities. In such a scenario, a common server (i.e., the actual physical box and all), located in Little Rock also serves the Ft. Smith and Memphis locations,

Re: Evaluated "require $database" not found.

2004-12-27 Thread Jeff Zucker
Ron Wingfield wrote: RE: Your question, "I still have no idea what you mean by $database. Is that the DBD, the RDBMS, the schema within the RDBMS, or something else?" No, . . .nothing that sophisticated. It's my spelling (could just as easily be $foobar ) for a scalar variable to whom is as

Re: Evaluated "require $database" not found.

2004-12-26 Thread Jeff Zucker
Paul Boutros wrote: If I understand correctly, you're trying to decide at run-time what module to include. I don't think that's possible. For example, the following code: use strict; my $val = 'DBI'; require $val; Try it with $val = 'DBI.pm' :-) -Original Message- Continuing to experiment

RFC: New interface for Text::CSV_XS

2004-12-16 Thread Jeff Zucker
While not strictly DBI, this request for comments may be of interest to many on this list, so, with Tim's permission, I am posting here. I propose to add a new interface to Text::CSV_XS and would value comments and suggestions. This interface will be *in addition to* the existing interface so s

Re: Perl DBI Documentation Proposal: Using NULLs in Placeholders

2004-12-16 Thread Jeff Zucker
CAMPBELL, BRIAN D (BRIAN) wrote: $sth = $dbh->prepare("CREATE TABLE $tablename (key int, mycol char(8))"); You might want to change the name of the first column since KEY is a SQL keyword and some databases will reject it. That might also apply to the NAME column in your examples. -- Jeff

Re: DBD::Sybase for ActiveState perl

2004-10-01 Thread Jeff Zucker
Michael Peppler wrote: On Thu, 2004-09-30 at 12:41, Michael Peppler wrote: Thanks to Jeff Urlwin there are now PPDs for DBD::Sybase I used the instructions posted in http://www.perlmonks.org/index.pl?node_id=387070 (thanks Jeff!) to get the various tools under Windows (VC++, etc). Let's not blame t

Re: passing array as subquery to a SQL query

2004-09-27 Thread Jeff Zucker
Kamran wrote: my @ids = (1,2,3) ; my $SQL = "select * from students where id in (@ids)"; Instead use: my $SQL = 'SELECT * FROM students WHERE id NOT IN (' . join ',' , @ids . ')' ; Because a) you want NOT IN and b) The values inside the parens of the IN predicate mu

Re: Sourceforge Project Name?

2004-09-20 Thread Jeff Zucker
H.Merijn Brand wrote: On Thu 16 Sep 2004 22:36, Jeff Zucker <[EMAIL PROTECTED]> wrote: SQL::Statement As a side note, could you rewrite the test cases on this one to fit in the general format of testing output, instead of the list of 100 numbers? Suggest using Test::Simple or Test::More W

Re: DBD::CSV and large files...

2004-09-20 Thread Jeff Zucker
amonotod wrote: I am wondering if there is any kind of switch that can be passed to DBD::CSV that will enable it to parse only one EOL at a time? No, but Text::CSV_XS, which underlies DBD::CSV can easily parse a line at a time. I think there's discussion of adding something along the lines o

Re: Parsing

2004-09-17 Thread Jeff Zucker
Erich Singer wrote: I have to replace any comma (,) between quotation marks ("") only, with a ~ For example This way I can use the comma as a field delimiter for parsing purposes in order to insert the various fields into the database That is a bad way to parse Comma Separated Values (CSV). A bett

Re: :ADO, fetchall_hashref - ok with DBI::PurePerl but not DBI :-(

2004-09-17 Thread Jeff Zucker
Hampson, Paul wrote: From: Jeff Zucker <[EMAIL PROTECTED]> [DBD::ADO with DBI::Pureperl doesn't exhibit the same bugs as with DBI] Ah, this fixed _both_ problems. ^_^ The output's the same, too. So I'm well satisfied. And I don't obvserve any speed difference, but tha

Sourceforge Project Name?

2004-09-16 Thread Jeff Zucker
[cc'd to dbi-dev but follow ups set to dbi-users] Hi all, As the number of DBI related modules I maintain has grown (currently over a dozen), I have noticed two things: my reach has exceeded my grasp :-) and I want/need a community of people helping develop/maintain the modules. I need help in

DBD::ADO, fetchall_hashref - ok with DBI::PurePerl but not DBI :-(

2004-09-16 Thread Jeff Zucker
Hampson, Paul wrote: Trying to call fetchall_hashref against a statement handle from an DBD::ADO connection, I get a whole bunch of: Attempt to free unreferenced scalar: SV 0x1c97bf0 at I was just about to write up a message on this same thing. A user reported to me that they got this message

Re: PERL DBI EXECUTE for multi '?'

2004-09-14 Thread Jeff Zucker
Jbari Mohamed Said wrote: select record1 from table where record2 in ('122','134') The problem is i don't know in fact the number passed to 'in' in the select below so when i call 'execute' from PERL/DBI module like this: <> $sth = $dbh->prepare(q{select record1 from table where record2 in

Re: 1.43 make test hangs at t/10examp under cygwin

2004-09-08 Thread Jeff Zucker
Tim Bunce wrote: Can anyone else using cygwin reproduce the problem? Or not? I can't. Output below. -- Jeff Perl: 5.008005(cygwin-thread-multi-64int) OS : cygwin (1.5.10(0.11642)) DBI : 1.43 DBD::Sponge : 11.10 DBD::File : 0.31

Re: Parsing question...

2004-09-07 Thread Jeff Zucker
Is there some reason you aren't using DBD::CSV or its parser (Text::CSV_XS), which handle this and a number of other problem issues with parsing CSV? Why reinvent the wheel? -- Jeff NIPP, SCOTT V (SBCSI) wrote: This isn't specifically a DBI question, but it is a part of a database script I am

Re: DBD::PgPP and PG8 beta

2004-08-19 Thread Jeff Zucker
Jeff Zucker wrote: Alec Brecher wrote: I run DBD::Pg 1.22 on a windows host successfully. I initially tried DBD::PgPP and found it buggy. The Pg installation took a fair amount of fussing but runs very well. -Alec Whoa, you are a better man than I am, Alec :-). Oops, I take it back :-). I

  1   2   3   4   >