Re: SQL Server and 'set dateformat'

2005-07-06 Thread Jeff Seger
try: my $sth = $dbh-prepare( set dateformat dmy )|| die $dbh-errstr; #to see if it's puking on prepare or $dbh-do( set dateformat dmy ) || die $dbh-errstr; # this is the format I've learned to use for setting # session params. Daniel Kasak wrote: Hi all. The SQL Server docs say that

Re: Perl DBI and Perl CGI headers

2003-01-31 Thread Jeff Seger
to sweep e-mail and attachments for viruses, it does not guarantee that either are virus-free and accepts no liability for any damage sustained as a result of viruses. -- Jeff Seger [EMAIL PROTECTED] Fairchild Semiconductor

Re: Why can't use SQL GROUP BY...?

2003-01-10 Thread Jeff Seger
status, MAX(id) FROM my_table GROUP BY status HAVING status IN (1, 2) should be SELECT status, MAX(id) FROM my_table WHERE status IN (1, 2) GROUP BY status Ronald -- Jeff Seger [EMAIL PROTECTED] Fairchild Semiconductor

Re: $db-{LongReadLen};

2003-01-03 Thread Jeff Seger
I'm a little confused by: $db-{LongReadLen}=some_number; This seems to me to effect insert and update but not read for text fields. Is that right? Quite the opposite. It should not affect regular text (char, varchar) fields at all, but only long, blob, memo etc and when it does, it

Re: Table Names

2002-11-26 Thread Jeff Seger
I may be wrong...I seem to be making a habit of it lately...but I don't think you can. SHOW TABLES is a mysql command, not an sql statement. On Tue, 2002-11-26 at 10:02, darren chamberlain wrote: * Chris Rogers [EMAIL PROTECTED] [2002-11-26 09:45]: Is there a way to get a list of all table

Re: Table Names

2002-11-26 Thread Jeff Seger
; } -Mike At 11:49 AM 11/26/2002, Jeff Seger wrote: I may be wrong...I seem to be making a habit of it lately...but I don't think you can. SHOW TABLES is a mysql command, not an sql statement. On Tue, 2002-11-26 at 10:02, darren chamberlain wrote: * Chris Rogers [EMAIL PROTECTED

Re: Execute an Oracle Function (not a Procedure)

2002-11-18 Thread Jeff Seger
Maybe I am missing something herre (It is Monday after all) but shouldn't a function be called in a select statement: select OWNER.MY_FUNCTION(?,$action,?,$meta_type) from dual or something similar? On Mon, 2002-11-18 at 10:43, Michael A Chase wrote: On Mon, 18 Nov 2002 15:32:52 +0100 NYIMI

Re: FW: question on null or 0

2002-10-16 Thread Jeff Seger
simple fix: while( ($col1) = $sth_1-fetchrow_array){ because $sth_1-fetchrow_array returns an array, $col1 needs to be part of a list context. On Wed, 2002-10-16 at 13:10, Liu, Jenny wrote: The following simple sql statement just try to select a column from a table. But if the value is

Re: Broken DBI after upgrading debian to Woody

2002-09-20 Thread Jeff Seger
If the version of Perl that came with woody is a pre-compiled one, it's important to compile the DBD/DBD packages with the same compiler. You may want to re-install perl by compiling it from CPAN, then re-install DBI/DBD by compiling it yourself. HTH, jeff On Fri, 2002-09-20 at 08:34, William

Re: MS SQL Issue

2002-09-12 Thread Jeff Seger
Not sure as I am accustomed to Oracle. but that sounds like a similar error message that you get in Oracle when the user you are connecting as doesn't have select permissions on the table you are querying. hth, jeff On Thu, 2002-09-12 at 12:37, Cheryl Duggan wrote: I have a cgi script that

Re: $sth-err for multiples descriptors

2002-09-11 Thread Jeff Seger
Could you provide a code sample? On Wed, 2002-09-11 at 10:51, sidi MOHAMED CHEINE wrote: I have a problem with dbi, I set up a system of capture of error. In my program I use two descriptors dbi, only when I intercept an error on the undes descriptors, the tests of errors $sth-err gives

RE: why do I need to supply user password

2002-09-06 Thread Jeff Seger
On the other hand, if you need to pass connection attributes (LongReadLen, LongTruncOK, RaiseError, etc) you may need to put in empty strings for the user name and password: $dbh=DBI-connect($connect_string, '', '', %attr); Or is it undefs? I never touch the ODBC stuff myself. HTH, jeff

Re: Newbie question concerning DBI

2002-07-09 Thread Jeff Seger
Ok, my best guess is that you have blank lines in your data file. You may be passing an empty string to your prepare statement. What is on line 16 of your datafile? Also, at what point do you set the value of $file? You need to execute and fetch the values from the first query into $file or

Re: ORA-12538 ?!

2002-06-26 Thread Jeff Seger
1) I always re-compile DBD::Oracle when I change Oracle clients. I don't know if this will fix the problem, but it's where I'd start. 2) Probably also a good time to upgrade your DBD::Oracle. 3) This would be a good time to upgrade your version of DBI. On Wed, 2002-06-26 at 10:33, [EMAIL

Re: need execute perms?

2002-06-24 Thread Jeff Seger
Are you certain that you have the correct path to the perl executable? Try changing your shebang line to: #!perl and see if they are then executable. On Mon, 2002-06-24 at 11:52, John Day wrote: 1.. Have you made the scripts executable? by using CHMOD 755 or something similar. You can often

Re: Can't bind unknown placeholder ':p2' (2)

2002-06-20 Thread Jeff Seger
Did you: use DBD::Oracle qw(:ora_types); ? You may also need to reference $clob (\$clob) rather than passing a copy, but I'm not sure on that. HTH, jeff On Thu, 2002-06-20 at 11:36, David Totten wrote: Hello, I am new to the list, and I have searched the archives for this problem, and

RE: best way to insert date/time into oracle table

2002-06-14 Thread Jeff Seger
Don't put SYSDATE in the execute. Put it in the prepared statement: my $sth = $dbh-prepare( INSERT INTO stats VALUES (SYSDATE,?,?,?,?) ) or die Cannot prepare SQL statements from $DBI::errstr\n; foreach (@stats){ chomp; ($host, $user $cpu_pct, $mem_pct = split( /,/ );

Re: refetch does not work

2002-06-12 Thread Jeff Seger
Again, you need to check the variable scope of $sth. The error that you are getting indicates that $sth is not defined within the current context. Assuming that $sth is properly scoped, you should be able to call fetch on it at any point within your code. On Wed, 2002-06-12 at 13:10, pascal

Re: Fw: mysql query statement

2002-06-10 Thread Jeff Seger
My understanding is that you cannot pass keywords as parameters because the RDBMS cannot confirm the validity of the statement and thus cannot prepare it. As a matter of fact, it doesn't even know what the whole statement will be with a bind variable in that position. Similarly keywords On

Re: Inserting NULL in DB2 DECIMAL Field

2002-05-30 Thread Jeff Seger
$sth-execute(undef); On Thu, 2002-05-30 at 14:01, [EMAIL PROTECTED] wrote: Howdy, I've got an application that pulls data from an Oracle database to an IBM DB/2 database. For the IBM database, if the data I'm pulling contains all zeros or all spaces, they want me to insert a NULL

Re: Windows, forks and databases ...

2002-04-05 Thread Jeff Seger
Well, perhaps if you posted some code we could have a little better chance of seeing what the problem was. On Fri, 2002-04-05 at 06:33, Bogdan Badiu wrote: Hello ! I want to use Windows 98 /2000 , perl 5.6.1 and DBI and DBD-mysql … Using just forks is ok, using just DBI and

Re: DBI vs. piping query to Mysql

2002-04-04 Thread Jeff Seger
If you are running apache with mod_perl and if the site has more than a couple of visitors an hour and you use Apache::DBI for connection pooling, you can bet that you will speed up by using DBI. A lot. A whole lot. On Wed, 2002-04-03 at 18:33, Peter Scott wrote: At 04:28 PM 4/3/02 -0500,

RE: UPDATE Statement Problem...

2002-04-02 Thread Jeff Seger
That looks a bit off to me. Try something like this: $dbh-do(qq{UPDATE systems SET column_name = $value WHERE Name = $name}); On Tue, 2002-04-02 at 12:01, NIPP, SCOTT V (SBCSI) wrote: New problem now. I appear have resolved my earlier problems. The final issue appears to have been

Re: Insert is extremely slow

2002-03-04 Thread Jeff Seger
We run sqlldr at run time all the time. Here is the syntax, minus a bit of error checking. Obviously, you'll need to set the variables according to your own environment. But we do inserts of hundreds of thousands of rows for each of several dozen tables daily and issuing an insert for

Re: Install DBI on IBM-AIX

2002-01-25 Thread Jeff Seger
Um, shouldn't that be: perl -MCPAN -e 'install Bundle::DBI' or alternatively: perl -MCPAN -e shell install Bundle::DBI ??? Kenny Smith wrote: Murali, ppm has not been installed with my AIX perl. I did a find ppm and it is not on the RS6000. Do I need to install ppm? ps: Corrections

Re: why I can't install DBD:oracle on linux

2002-01-15 Thread Jeff Seger
What you need to successfully install the DBD::Oracle is a full *client* install of Oracle. You do not need a full server install and that may be where the confusion is. Leonardo Barbosa e Oliveira wrote: Sir, First of all, Thanks!But actually what I've heard was that I need some libs and

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

Re: Unsubscribing?

2001-12-07 Thread Jeff Seger
I think, though I have only used LookOut Express, and that only infrequently,that you can right click on a message on the list and choose properties. Totally intuitive. No, really, totally. Laurie Gennari wrote: Surely Outlook has a way of letting you view message headers? Open the

Re: ::massive sql query using dbi - please help::

2001-11-02 Thread Jeff Seger
If the query just hangs there in mysql, putting it into DBI is not going to fix that. Are the columns indexed in the tables? If not, you've probably got it doing nested full table scans. Try adding indexes to the tables on the join columns. Get the query to run in mysql before you ever try it

Re: Unix GUI tool for Oracle (and others like mysql in future)

2001-10-15 Thread Jeff Seger
From my reading of it, you only have to worry about fees if you are developing commercial applications which themselves use QT. TOra, which is itself GPL'd, uses the free version of QT. qw{ I just want to run KDE on my machine. Can I do that with the Free Edition?

Re: background sql queries

2001-08-09 Thread Jeff Seger
Tongue planted frimly in cheekok, so do this: $qh = $dbh-prepare(blabla); print SQL is busy processing your query, please wait ...\n; $qh-execute; @results = $qh-fetchrow_array; print ... Processing complete.\n; The whole point of this is that TIMTOWTDI, but if you actually want to be

Re: Using Informix LOAD and UNLOAD from DBD::Informix

2001-07-16 Thread Jeff Seger
If you are loading a large file to Informix and want to avoid the overhead of doing many inserts, you can call dbaccess from a system call and pipe commands to it (see below). Otherwise, you need to loop and insert each row individually. While I love DBI, doing inserts just isn't as fast as

Re: ORA-01008 on Oracle7 with DBD::Oracle v1.07

2001-07-12 Thread Jeff Seger
Are you sure what versions you have?? Richard Sutherland wrote: All, I am getting an ORA-01008 when using bind variables on Oracle7 instances, but not on Oracle8 instances. This has happened on both Unix and Linux OS's. Here is the error: DBD::Oracle::db prepare failed: ORA-01008: