Re: dealing with csv files

2001-03-18 Thread Jeff Zucker
Stacy Mader wrote: Hi all, In a file called weather (in /tmp/weather_db) I have some date files in the following format: DateTime,MaxWSpd,AvgWSpd,WindDir,AirPres,RainBkt,RelHumd,OutTemp,InsTemp,MsrTemp,FocTemp,XtrTemp The column name "DateTime" is not a valid SQL column name. Column

Re: DBD CSV

2001-05-14 Thread Jeff Zucker
Peter Gibbons wrote: hello all, i'm looking for a DBD CSV basic example with two tables involved in a join. Is this possible and if so can you provide a basic example.. many thanks Pete DBD::CSV doesn't support SQL join statements, but it's possible to fake them by combining two

Re: Straight perl question (a little OT)

2001-06-08 Thread Jeff Zucker
Karen Ellrick wrote: I tried downloading a little set of scripts for processing my HTTP access log One of the unfortunate consequences of DBD::AnyData is that it makes even a completely non-DBI request like this have some DBI relevance :-(. use DBI; my $dbh =

Re: CGI Script like MySQLMan

2001-06-08 Thread Jeff Zucker
projectperl wrote: Is there a CGI Script similar to MySQLMAN that would support DBD::RAM, DBD::AnyData? please email replies, dk henderson Well, I have a bunch of non-generic ones doing specific things on various websites. The AnyData::Format::HTMLtable module should provide a good tool

Re: DBD CSV Distinct clause not working

2001-06-19 Thread Jeff Zucker
Sanjiv Jivan wrote: The distinct clause in an SQL query does not work in some cases. ... For some reason it treats 400-522 and 400-523 as the same. Are you running with warnings (-w)? If not, you should be. If so, you will probably see something like this warning: Argument 400-522

Re: DBD CSV Distinct clause not working

2001-06-19 Thread Jeff Zucker
Mitch Helle-Morrissey wrote: Maybe you are having some problems with string vs. numeric operations. Yes. That's the problem. I'm haven't ever used DBD::CSV, but maybe there is a quote() operator that you can use, and send in the correct datatype? This module (and DBD::AnyData also)

ANNOUNCE - AnyData 0.04

2001-06-27 Thread Jeff Zucker
AnyData.pm, for the DBI/SQL version you need both AnyData.pm and DBD::AnyData.pm and you should install AnyData.pm first. -- Jeff Zucker README FILE FOR PERL MODULE -- AnyData WHY USE IT? The AnyData modules provide simple and uniform access to data from many sources -- perl arrays, local files

ANNOUNCE -- DBD::AnyData 0.04

2001-06-27 Thread Jeff Zucker
, for the DBI/SQL version you need both AnyData.pm and DBD::AnyData.pm and you should install AnyData.pm first. -- Jeff Zucker README FILE FOR PERL MODULE -- DBD::AnyData WHAT THE HECK IS IT? The DBD::AnyData module provides a DBI (Perl Database Interface) and SQL (Structured Query Language

Re: Problems with XML format in AnyData

2001-06-28 Thread Jeff Zucker
Tolkin, Steve wrote: The failure was that make test from anyData shows AnyData XML ... and then it hangs. I've had another report of the XML test hanging, but haven't been able to reproduce it yet. I'll look into it and get back to you. But some of the Twig tests failed. Is

Re: .htpasswd and DBD::CSV

2001-07-12 Thread Jeff Zucker
Perl DBI wrote: i thought it's like DBD::CSV where i can connect to a CSV file and use SQL. how about DBD::RAM? Actually DBD::RAM has been replaced by DBD::AnyData, and both of them will do what you want -- allow you to run SQL on a .htpasswd file. Here's how: use DBI; my $dbh =

Re: .htpasswd and DBD::CSV

2001-07-12 Thread Jeff Zucker
Orlando Andico wrote: in my experience DBD::CSV can be iffy. I just use Text::CSV_XS (where you can better control delimiters and stuff) Sorry, but AFAIK that just ain't true. DBD::CSV *uses* Text::CSV_XS and anything you can set directly in Text_CSV_XS you can set through DBD::CSV

Re: .htpasswd and DBD::CSV

2001-07-13 Thread Jeff Zucker
Bodo Eing wrote: regarding the items you mentioned above, true. But *DBD::CSV does not work with files containing periods the file name*, Not quite right, see below. because the file names are used as the table names by the SQL Layer on top of Text::CSV_XS. Right, because a period in a

AnyData Installation, Was: Re: DBI modules

2001-07-13 Thread Jeff Zucker
MikeBlezien wrote: On another note, Please use a different subject line when you are starting a new subject, I only found this by accident. has any one successfully install DBD::AnyData and used it?? It seems to install properly, but when used in a script, I keep getting an error, about

Re: AnyData Installation, Was: Re: DBI modules

2001-07-13 Thread Jeff Zucker
MikeBlezien wrote: Yes, I did figure that out after digging a little deeper, but still no luck installing the AnyData module. I've tried installing the XML-DOM and Bundle::XML with no luck either. this is on a freeBSD 4.1 XML ... Error Opening File-Parser: Can't locate XML/Twig.pm in @INC

Re: ANNOUNCE: DBD::AnyData version 0.05

2001-07-18 Thread Jeff Zucker
Matthew Wickline wrote: The AnyData modules support tables that have a single key column that uniquely identifies each row as well as tables that do not have such keys. How does one insert a row into a tied-hash $table which has no key column? Answer 1: use the DBI interface instead

Re: accessing a result of a query in HTML format...

2001-07-18 Thread Jeff Zucker
Bhuvan A wrote: how can we retrive a result of a query in pre-formatted HTML format in DBD::Pg?? This prints the results of a Pg (or any DBI database) query as an HTML table: use DBI; my $ad_dbh = DBI-connect('dbi:AnyData:(RaiseError=1)'); my $pg_dbh = DBI-connect( @pg_connect_values );

Re: duplicating tables

2001-07-31 Thread Jeff Zucker
From: Tom McDonough Is there a simple command which wil duplicate a table without writing a script? I'm want to do this first in DBD:CSV and then in DBD:mySQL. In DBD::CSV, a table is just a file, so you would use 'cp' (or whatever your system's file copy command is) to duplicate a table.

ANNOUNCE - SQL::Squish version 0.02

2001-08-01 Thread Jeff Zucker
There are lots of new features and bug fixes in the Parser, in the Executer, and in the interactive shell. Thanks to Earl and Jeremy for suggestions. Here's the changes log: = SQL::Squish -- a standalone SQL interactive shell

Script to batch process SQL with Squish

2001-08-01 Thread Jeff Zucker
[For those of you who may be wondering what the *)(# Squish has to do with DBI, it is among other things, a way of testing the new pure perl SQL::Statement which, will be subclassed by DBD::AnyData, maybe also by DBD::CSV? and DBD::Xbase?, and by other subclassers either within or outside of DBI.

Re: DBD::CSV and Taint Mode

2001-08-22 Thread Jeff Zucker
Smithson, Michael (M.E.) [EMAIL PROTECTED] wrote: ... When I turn off the taint mode, it seems to work fine. Are there any workarounds or resources that anyone can tell me about to help me out?? Untaint the data before you send it to DBD::CSV or DBD::AnyData (see the faq on Taint), or use

Re: ANNOUNCE: SQL::Statement 0.2001

2001-08-23 Thread Jeff Zucker
Sterin, Ilya wrote: My first question is when I retrieve the column names, I want to modify that part of the query and be able to use that to reconstruct the query. Here is an example. my $query = select foo1, foo2, foo3 from bar; my @columns = $stmt-columns(); Now I want to be able

ANNOUNCE: SQL::Statement 0.2001

2001-08-23 Thread Jeff Zucker
I'm pleased to announce the first alpha version of SQL::Statement-0.2001. This is a pure perl module based on Jochen Wiedmann's SQL::Statement-0.1x series of XS and perl modules. When used with the current version of DBD::CSV or other modules based on SQL::Statement-0.1x it should behave like

Re: DBD::CSV problem sorting ISO style dates

2001-09-10 Thread Jeff Zucker
Alex Schuilenburg wrote: Hi I have successfully been using DBD::CSV for the last year and recently upgraded to Red Hat 7.0 from 6.2. The problem is that ever since the upgrade, the ORDER BY clause on an ISO date field (i.e -mm-dd,m e.g. 2001-09-10) no longer works. The sort

Re: Newbie Question

2002-07-17 Thread Jeff Zucker
Dana Lucent wrote: Currently, I am receiving the error Execution ERROR: Cannot open .\table: No such file or directory at C:/PERL/site/lib/DBD/File.pm line 469. Do you have a file called table in your current working directory? If not, then you need to either use the name of the file (if

Re: Table Joins in DBD::AnyData

2002-07-23 Thread Jeff Zucker
Jim Blomo wrote: Is there any work being done to support the use of multiple tables in a single SQL statement? The join-enabled SQL::Statement has been out all year. It supports explicit joins (e.g. FROM x NATURAL LEFT JOIN y, etc.) and implicit joins that have equality comparisons. It

Re: how to install on unix without make utility

2002-07-24 Thread Jeff Zucker
Parwe, Anand wrote: Is it possible to install DBI module on solaris box without using make utility. You can compile and make it on another solaris box and then just copy into into place on the target box. OR you might be able to get a pre-built binary from someone else. OR if neither of

Re: Request help with DBD::CSV code sample that is not working as expected on UNIX (Solaris).

2002-07-24 Thread Jeff Zucker
Andrew Crum wrote: Oh, yeah, I forgot to mention that these two lines are redundant: $dbh-{csv_tables}-{table}-{skip_rows} = 0; $dbh-{csv_tables}-{table}-{col_names} = [qw( col1 col2 col3 col4)]; csv_skip_rows is automatically set to 0 if you specify the col_names parameter so you don't

Re: Thoughts on DBD::CSV?

2002-07-29 Thread Jeff Zucker
John Brooking wrote: However, I'm experiencing some limitations and odd behavior with DBD::CSV, which I don't see addressed in the perldoc. The problem I'm currently struggling with concerns the comparison operators used on text fields. That kind of comparison was not supported in the

Re: Fwd: Followup on DBD::CSV question

2002-07-31 Thread Jeff Zucker
John Brooking wrote: Also one last question (AFAIK) about what is supported: See the pod documentation in SQL::Parser for a description of what SQL is supported in DBD::CSV. What about GROUP BY No, not yet supported. and standard grouping functions such as SUM and COUNT?

Re: total row count with SQL 'LIMIT' batching

2002-08-17 Thread Jeff Zucker
A M Thomas wrote: It makes a lot of sense from a user interface point of view to show the web user the _total_ number of records that match the search criteria, and possibly, calculated from that, the number of batches (think Google). I don't know of any way in SQL other than a second

Re: DBD::AnyData Issue - Perl 5.004_4

2002-08-17 Thread Jeff Zucker
[EMAIL PROTECTED] wrote: Hello. I've got a bit of a problem with my app when running on Perl 5.004_04. Basically, I'm using DBD::AnyData to retrieve rows from csv files. Yes, sorry, DBD::AnyData requires perl 5.005 or better. DBD::CSV is still, for the time being, usable with 5.004 so

Re: DBI runs on a Zaurus!

2002-08-25 Thread Jeff Zucker
Dean Arnold wrote: PDA now means Perl Digital Assistant I finally scraped up some time on a gloomy Sunday here in Seattle, Ah, didn't realize that you were just up the road (I'm in gloomy Portland). If you're ever down this way let me know or if you'd like to chat when I'm next up

Re: AnyData error

2002-09-19 Thread Jeff Zucker
Jeff Thies wrote: I'm getting this error (on execute) when I try to use DBI and AnyData (.5). DBD::AnyData::st execute failed: Undefined subroutine AnyData::adTable It sounds like you don't have AnyData.pm properly installed. (You must install both AnyData.version.tar.gz and then

Re: TYPE, PRECISION, SCALE in DBD::CSV/File ?

2002-09-19 Thread Jeff Zucker
Bill Cowan wrote: I think doing something similar to what is done by MS ODBC Text driver is quite reasonable. That is, use same or similar format used by schema.ini file used by ODBC Text driver. Yep, I have pretty much already come to that same conclusion, but there are some additional

Re: Database to Excel script...

2002-10-01 Thread Jeff Zucker
Sterin, Ilya wrote: You can easily accomplish that by dumpin into a CSV (comma separated file) with .csv extension which will open in excel as you want. Here's one for the FAQ: How do I use DBI with Excel? With Kawai Takanori's DBD::Excel (on CPAN). It provides a DBI interface on top of

Re: Uploaded to CPAN: DBIx::Dump

2002-10-01 Thread Jeff Zucker
Hi Ilya, ISDBIx::Dump allows to dump DBI result set into a variety of formats JZDBD::AnyData's export method already does that for multiple formats. ISDoes it allow you to export it from all databases, or only databases that DBD::AnyData supports? Export and convert work on any DBI supported

Re: Database to Excel script...

2002-10-01 Thread Jeff Zucker
Ilya Sterin wrote: Jeff Zucker wrote With Kawai Takanori's DBD::Excel (on CPAN). Yes, but DBD::Excel allows you to query Excel files, not dump them. Here's a somewhat simple minded patch to DBD::Excel that allows one to create and populate an Excel file with standard SQL CREATE

Re: Database to Excel script...

2002-10-01 Thread Jeff Zucker
KAWAI,Takanori wrote: $hDbE-func('dump.xls', 'save'); Hmm, forget my patch, I missed that somehow :-(. Actually the one part of the patch you might want to keep is the part that creates a new .xls file if the one in the connect doesn't exist yet. Here's the patch for that part. (Please

Re: Database to Excel script...

2002-10-01 Thread Jeff Zucker
Sterin, Ilya wrote: Jeff, that's helpful:-) but that does not pupulat the excel spreadsheet with data from a select query, rather you have to select and loop while do()ing it. There is lot of overhead for certain things, I just though a simple mod would help to just dump data, and

AnyData Conversion (Was Re: Uploaded to CPAN: DBIx::Dump)

2002-10-03 Thread Jeff Zucker
Sterin, Ilya wrote: That would be fine. I was thinking in terms of supporting data formats that can't be queried, Yes, there are already some like that, for example one can query Mp3 file embedded text tags, but not create or modify them. AnyData.pm, I haven't looked at the source,

Re: Dynaloader

2002-10-08 Thread Jeff Zucker
Bill Hamilton wrote: This may be the proper forum for this, but here goes: I installed the latest DBI.pm and DBD.pm. This onto an ActiveState distribution on an NT box. As I understand it, the install consists of copying the files into the proper perl\site\lib directory. Nope, wrong,

Re: AnyData Conversion

2002-10-15 Thread Jeff Zucker
[EMAIL PROTECTED] wrote: I'm very interested in the new DBD::AnyData as I use it to work with CSV files in conjunction with DBI::PurePerl. Does the new version that's in the works have any speed/resource/architecture improvements? Yes! I'm finalizing three things which will add speed: 1)

Re: Any::Data and limit

2002-10-18 Thread Jeff Zucker
Jeff Thies wrote: I'm using a pipe delimited table with Any::Data. This seems to ignore the limit clause in my SQL: SELECT field1 FROM some_table limit 0,2 I would have thought this (limit) would have been part of DBI, is this a function of the driver? Yes, it's driver and database

Re: Create database

2002-10-18 Thread Jeff Zucker
Andrew Brosnan wrote: On 10/18/02 at 4:26 PM, [EMAIL PROTECTED] (Hardy Merrill) wrote: What database are you using? Not sure why it would matter, but MySQL. Yes it matters. This works for me using MySQL: my $existing_db = $your_old_db_here; my $new_db = $your_new_db_here; my

Re: Create database

2002-10-18 Thread Jeff Zucker
Andrew Brosnan wrote: I was hoping the code could be database independent (excepting of course the driver) CREATE DATABASE is not part of either SQL92 or SQL99. They have a CREATE SCHEMA syntax. But, AFAIK, most implementations do have a CREATE DATABASE command anyway. -- Jeff

Re: DBD::CSV and multiple table queries

2002-10-25 Thread Jeff Zucker
Scott McGee wrote: SQL::Parser v1.004 SQL::Statement v1.004 ... my $query = SELECT megaliths.id, megaliths.name, site_types.site_type Yes, there is a bug in SQL::Statement related to table names combined with a column name (e.g. megaliths.id). I will be releasing a fix later today.

Re: Having Problems with DBD::CSV (Ilya - FAQ?)

2002-12-12 Thread Jeff Zucker
Hi David, SQL string values must occur between single quotes, not double quotes: SELECT * FROM foo WHERE bar = 'baz' CORRECT SELECT * FROM foo WHERE bar = baz WRONG Values that have single quotes inside them must not appear in the SQL as raw single, quotes, they must be escaped.

Re: Having Problems with DBD::CSV (Ilya - FAQ?)

2002-12-12 Thread Jeff Zucker
PROTECTED]] Sent: Thursday, December 12, 2002 15:03 To: Jeff Zucker Cc: dbi-users Subject: Re: Having Problems with DBD::CSV (Ilya - FAQ?) On Thu, 12 Dec 2002 11:52:25 -0800 Jeff Zucker [EMAIL PROTECTED] wrote: Sterin, Ilya (I.) wrote: Anyone can add to the FAQ, they just need to register and create

DBI on a pocketPC - preliminary success

2002-12-17 Thread Jeff Zucker
Just a preliminary report - thanks to Rainier Keuchel's port of perl to winCE, I now have DBI (PurePerl) and DBD::AnyData doing database read access on my Toshiba e740 (a palm-like handheld running pocketPC on an xScale processor). The port also works on most other pocketPC and winCE device

Re: Testing - the DBI lists have gone very quiet!

2002-12-23 Thread Jeff Zucker
Jonathan Leffler wrote: I got one email from the DBI lists overnight, instead of thirty or so. Did everyone go away for Christmas? There's nothing wrong with noise that a little silence won't cure. More signal cures it too. The list has just switched noise-combating tactics for a week or

Re: List files - Thanks and new one :-)

2003-01-09 Thread Jeff Zucker
Don Mathews wrote: I have a subroutine say FOO in my program. This mailing list is about DBI. If you have questions that aren't directly related to DBI, please send them to a more appropriate place, for example comp.lang.perl.misc. -- Jeff

Re: DBD-OCBD. select gives everytime 0E0 as affected rows!?

2003-01-18 Thread Jeff Zucker
alex wrote: my $rv4 = $sth4-execute('$ip','$http_user_agent'); if ($rv4 eq '0E0') { a... removing the ' around the vars will fix it :-(. my fault... but the ' are needed on inserts... strange thing... See the following for a description of when quote marks are needed and when they

Re: Perl DBI and Perl CGI headers

2003-01-31 Thread Jeff Zucker
[EMAIL PROTECTED] wrote: I am writing a perl script that uses perl dbi to query a UDB database and display the results on a web browser and I am using Perl CGI. How can I add the following html tags below between the HEAD tags in cgi?

Re: Help on group by with DBI::CSV

2003-02-12 Thread Jeff Zucker
Ming Lei wrote: I am using CSV under DBI. A select statement with group by always gives me error: That's because the GROUP BY clause is not supported by DBD::CSV. Please look in the documentation for SQL::Parser to see a list of the (fairly limited) SQL that DBD::CSV supports. It works

Re: Help on group by with DBI::CSV

2003-02-12 Thread Jeff Zucker
Ming Lei wrote: [BTW: there is no such address as dbi-users-help, please trim it from your cc list] Alternatively, you could accomplish the same effects as a GROUP BY by using several combined queries and/or some perl manipulation. I would appreciate if you or someone else can point out how

Re: SQL-Statement problem

2003-02-14 Thread Jeff Zucker
Walter B. Takens wrote: Dear all i am having a problem with SQL-Statement-1.005, whereas SQL-Statement-0.1020 is working fine. SELECT KOLOM1,KOLOM8,KOLOM5,KOLOM6,KOLOM7 FROM MYTABLE WHERE ( ( ( ( KOLOM4 = '123456' OR KOLOM4 = '' ) AND KOLOM3 = '127' ) OR KOLOM8 = 'TRUE' ) AND KOLOM1 = 'bla'

Re: SQL-Statement problem

2003-02-14 Thread Jeff Zucker
Dan Muey wrote: Before SELECT KOLOM1,KOLOM8,KOLOM5,KOLOM6,KOLOM7 FROM MYTABLE WHERE ( ( ( ( KOLOM4 = '123456' OR KOLOM4 = '' ) AND KOLOM3 = '127' ) OR KOLOM8 = 'TRUE' ) AND KOLOM1 = 'bla' ) Does this query work from the command line app? It seems to me it wouldn't becaue you have 4 ('s and

Re: sorting by number in DBI::CSV

2003-02-18 Thread Jeff Zucker
[EMAIL PROTECTED] wrote: I am storing dates in the form 20030218 (as it seems that there is no DATE format for Tables). If I do SELECT * FROM table ORDER BY datefield, my program just hangs I haven't heard any reports of this kind of behaviour and it sorts fine on numeric fields for me.

Re: case sensitivity when creating a table.

2003-02-20 Thread Jeff Zucker
Francois Desarmenien wrote: On Thu, 20 Feb 2003 14:44:02 -0500 Jose Blanco [EMAIL PROTECTED] wrote: Any ideas why SQL statements like this one: SELECT collid FROM Collection where collid= '123' and (userid = 'JoseA' or userid = 'JoseB') Are not working with SQL::Statement version 1.005, but

Re: case sensitivity when creating a table.

2003-02-20 Thread Jeff Zucker
Rudy Lippan wrote: I am confused. IIRC, SQL-99 (I don't have a 92 ref) says that delimited identifiers are case sensitive so Collection only matches Collection; however, COLLECTION will match Collection (collection COLLECTION) because each character of the regular identifier Collection is

Re: case sensitivity when creating a table. (corrected)

2003-02-20 Thread Jeff Zucker
Jeff Zucker wrote: There is no database independent way to match a delimited identifier to an undelimited identifier. That part of my previous post is correct, but my examples were bad. Here is a better explanation with examples from two differing implementations: In the ANSI standard

Re: case sensitivity when creating a table. (corrected)

2003-02-21 Thread Jeff Zucker
Tim Bunce wrote: In ODBC, a delimited identifier is equal to an undelimited identifiers if it matches *case-insenitively*. By ODBC I presume you mean windows ODBC using windows database like Access or MSSQL, because on windows case-insenitivity is the norm. Yes, correct, I checked against the

Re: paths to files in other folders, in DBI::CSV

2003-02-22 Thread Jeff Zucker
Clive Freedman wrote: I have DBI::CSV running OK when the table is created in the same folder as the perl script, and the data file is also in the same folder. But I cannot find a way of telling the script that the dbh table file and the data file are in a different folder. When I try to do

Re: DBD::CSV

2003-03-03 Thread Jeff Zucker
Peter Schuberth wrote: On the same hardware system the same select for the same table Please check your version of SQL::Statement which is the module that determines the speed and capabilities of DBD::CSV. Put these two lines at the top of the scripts: use SQL::Statement; print

Re: DBD::CSV--Execution ERROR: Couldn't find column names!.

2003-03-03 Thread Jeff Zucker
Snethen, Jeff wrote: I've worked with the DBI some, but I'm now starting to experiment with DBD::CSV. I'm trying to read a table without column headers, letting CSV create the column names for me. If I understand the documentation correctly, an empty array reference should cause the driver to

Re: DBD::CSV

2003-03-04 Thread Jeff Zucker
Peter Schuberth wrote: Hello Jeff, I believe the problem of the low speed is due using SQL-Statement 1.005. I think I should change to a XS Version like 0.1021. Maybe it will help, though as others have pointed out MySQL and PostgreSQL and SQLite may be better for you All of them work fine on

Re: DBD::CSV

2003-03-04 Thread Jeff Zucker
Tim Bunce wrote: On Mon, Mar 03, 2003 at 10:07:29AM -0800, Jeff Zucker wrote: use SQL::Statement; print $SQL::Statement::VERSION; Or run this command perl -MSQL::Statement= Hmm, what am I missing? That doesn't work for me with SQL::Statement. It also doesn't work for me with DBD::ODBC

Subclass Exporter and version number

2003-03-10 Thread Jeff Zucker
Tim Bunce wrote: On Tue, Mar 04, 2003 at 09:32:27AM -0800, Jeff Zucker wrote: Or run this command perl -MSQL::Statement= Hmm, what am I missing? That doesn't work for me From memory... it needs a non-lexical $VERSION and (I think) to be a subclass of Exporter. Hmm, that's right. If I

Re: shortcuts for common placeholder idioms...

2003-03-10 Thread Jeff Zucker
Paul Boutros wrote: my $sql = qq{ INSERT INTO table ( ${\comma_separated_values(@col)} ) VALUES ( ${\comma_separated_placeholders(@col)} ) }; I'm not sure I like this, but if it is to be used, a better name might be comma_list which is the BNF short notation for all comma separated

Re: DBD::CSV::db prepare failed when using IN with where clause

2003-03-12 Thread Jeff Zucker
[EMAIL PROTECTED] wrote: I am getting an error when I am trying to use an IN with DBD-CSV. It used to work before, so I don't know what happened. Every since DBD-CSV was installed on a new machine, the statements no longer work. I currently have version 0.1021 of SQL::Statement installed on

Re: SQL::Statement Issue

2003-03-14 Thread Jeff Zucker
[EMAIL PROTECTED] wrote: There seems to be an issue with SQL::Statement 1.005. The following SQL Statement works fine in 1.004: SELECT operator_id,operator_description FROM operator For legacy reasons operator is treated as a SQL reserved word. The next release will not work that way, until

Re: $dbh-unquote()

2003-03-27 Thread Jeff Zucker
[EMAIL PROTECTED] wrote: \n = \r\n in windows env. LOL. How can something be equal to itself plus something else? And the windows env is not a monolithic thing, its behaviour can be modified by binmode. A better way to say it is: \n is written as \015\012 in a windows environment if the

Re: (Fwd) postgres with perl dbi

2003-04-02 Thread Jeff Zucker
From: win harrington [EMAIL PROTECTED] We bought your excellent book on Perl DBI. Do you have an example of connecting to Postgres with DBI? To learn about particular datbase systems supported by DBI, look at the documentation for the DBD (driver) for that system. In this case it would be

Re: DBD cmd-line client driver?

2003-04-04 Thread Jeff Zucker
me know more specifically what your needs are and I may have some suggestions. -- Jeff Zucker

Re: RFC: SQL Extensions for SQL::Statement [Long]

2003-06-06 Thread Jeff Zucker
Bart Lateur wrote: On Wed, 04 Jun 2003 09:15:28 -0700, Jeff Zucker wrote: For per-table connections - CONNECT TO '$dsn1' AS tbl1 CONNECT TO '$dsn2' AS tbl2 Euh... you connect to a database, not to a table, no? Well, yes and no. The point

Re: CSV database creation via DBI?

2003-05-29 Thread Jeff Zucker
David Wilson wrote: Is is possible to create a database through CSV, or is DBI primarily for accessing established databases? If possible, how do I create a local database via DBI? If not, how do I manually create an empty CSV database? DBI works with database-drivers (DBDs) to communicate

Re: Performance of CSV Databases

2003-05-29 Thread Jeff Zucker
[EMAIL PROTECTED] wrote: in some cases one don't need really high performance but a well organized place to store data. In this case DBD::CSV may could be the solution. But what happens if the amount of data grows? When the data grows, you can easily migrate from DBD::CSV to any other DBD. You

Re: Getting DSN back from $dbh

2003-05-31 Thread Jeff Zucker
Dean Arnold wrote: Isn't that what $dbh-{Name} is for ? Sure, if all you want is the name of the DBD. -- Jeff

Re: Getting DSN back from $dbh

2003-05-31 Thread Jeff Zucker
Dean Arnold wrote: Actually, if you want the *whole* DBI dsn: use DBI; $dbh = DBI-connect($dsn, $user, $password); print 'dbi:', $dbh-{Driver}-{Name}, ':', $dbh-{Name}, \n; Duh, time for another cup of coffee. I could swear I just tried that ten minutes ago. gildanevermind/gilda -- Jeff

Re: SQL Extensions for SQL::Statement [Long]

2003-06-05 Thread Jeff Zucker
[reply-to dbi-users only please, sorry for the cross post] Dean Arnold wrote: 1) How many joins per stmt allowed ? 2) outer join support ? For the moment, joins won't be changing from what they currently are - two tables with explicit joins (including outer joins) or unlimited tables with

[Fwd: REJECTED MAIL]

2003-06-05 Thread Jeff Zucker
]) by mail14.speakeasy.net (qmail-ldap-1.03) with AES256-SHA encrypted SMTP for [EMAIL PROTECTED]; 4 Jun 2003 18:02:05 - Message-ID: [EMAIL PROTECTED] Date: Wed, 04 Jun 2003 10:58:22 -0700 From: Jeff Zucker [EMAIL PROTECTED] User-Agent: Mozilla/5.0 (Windows; U; Win98

Re: RFC: SQL Extensions for SQL::Statement [Long]

2003-06-05 Thread Jeff Zucker
Tim Bunce wrote: I'd like to be able to refer to existing dbh's as well. I'd also like to be able to treat an existing $sth as a 'table'. Yep. SELECT $cols FROM tbl1@$dsn1 ... JOIN tbl2@$dsn2 ... Both are a little ugly and prone to nested quote problems. Ew, nested quote problems, the

Re: SQL Extensions for SQL::Statement [Long]

2003-06-05 Thread Jeff Zucker
Dean Arnold wrote: Also, how easy will it be to overload/hook into the SQL syntax processing ? I'm slowly working on making that easier. It's certainly a goal. I think most things could be overloaded by subclassing SQL::Statement and SQL::Parser, why don't you send me some more details of

Re: SQL Extensions for SQL::Statement [Long]

2003-06-05 Thread Jeff Zucker
Dean Arnold wrote: 4) I concur that SQL extensions are better than DBI; have you considered a DBIx subclass implementation, ala DBIx::Chart ? I'm not sure what the benefit of that would be over keeping it in SQL::Statement, please clue me in if I'm missing something. Sorry, got my layers

Re: DBI:XBase error when reading dbf file

2003-06-07 Thread Jeff Zucker
Isabel Carvalho wrote: When I try to read a dbf file, using XBase in PERL, I immediately have an error: 'DBD::XBase::st execute failed: Table xx not found: Missmatch in header of x: record_len 2048 but offset 1696' I believe the last field mentioned in the Header is not populated in the

Re: DBI Prepare.al Problem

2003-06-09 Thread Jeff Zucker
Forquer, Brian R. wrote: my $sth = DBI-prepare( CREATE TABLE rep ( It's $dbh-prepare(), not DBI-prepare. -- Jeff

Re: Bringing old DBI DBD-CSV DBD-ODBC program up-to-date

2003-06-09 Thread Jeff Zucker
Clarke, Darin wrote: Hello, While breaking in a new desktop computer, I installed new versions of the DBI, DBD-ODBC, and DBD-CSV. I have found the program below (which takes records out of an Access DB with DBD-ODBC and puts them into a .csv file with DBD-CSV) You do know that you can just save

Re: DBD:AnyData running ~4+ times slower on Solaris/Perl 5.8 box...known issue, bad install, other?

2003-06-10 Thread Jeff Zucker
Sean Shrum wrote: Using the latest DBI and DBD-AnyData, I'm finding that DBI PREPAREs are taking much longer on a Solaris box. My first guess would be that the box has an older version of DBD::File (part of the DBD::CSV install). AnyData depends on DBD::File but I haven't yet made it

Re: DBI:XBase error when reading dbf file

2003-06-11 Thread Jeff Zucker
appreciate any ideas you may have. Thanks ! Isabel Jeff Zucker

Re: Archives

2003-06-13 Thread Jeff Zucker
Fred T Sanders wrote: Hi All Before I ask stupid questions about problems I'm having getting DBI to work with CVS files, I was wondering if there were an archive of past posts I could browse through first. The place to start is almost always http://dbi.perl.org It has links to the

Re: Max records

2003-06-14 Thread Jeff Zucker
Fred T Sanders wrote: Hi All Is there a known way of limiting the amount of rows returned by a query. I'm currently using DBI with CVS files. The SQL used by DBD::CSV is documented in the SQL::Parser module. One of the features is a LIMIT clause which works similarly to MySQL: SELECT $cols

RFC: SQL Extensions for SQL::Statement [Long]

2003-06-05 Thread Jeff Zucker
I will be releasing a significantly upgraded SQL::Statement and DBD::File shortly and I have some questions about interface. I'd really appreciate some feedback. These are the features that are near finalization: * heterogeneous SQL across multiple DBI sources * per-table DBI connections

Re: SQL::Statement problem

2003-06-20 Thread Jeff Zucker
Jean-Louis Leroy wrote: *** SQL-Statement-1.005/lib/SQL/Statement.pm Mon Jun 2 14:55:34 2003 Thanks very much, I will encorporate these in as soon as possible. -- Jeff

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

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

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

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

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: 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

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

  1   2   3   4   >