dbi Questions

1

Solved

I am using mysql database which has only one table "data" with 17,151257 rows.This table has a column string. i want to print all the rows in which string column contains a particular query string ...
Kinswoman asked 9/7, 2013 at 5:47

2

Solved

Consider the following table: mysql> select * from vCountryStatus; +-------------+------------+------+---------+--------+-----------------+ | CountryName | CountryISO | Code | Status | Symbol |...
Speechmaking asked 26/8, 2010 at 8:32

1

Trying to set a value in PostgreSQL using Perl and DBI, and thus DBD::Pg. I'm getting an odd error. 2013-05-23 19:02:36.641139500 updating status to 0 2013-05-23 19:02:36.641410500 DBD::Pg::st ex...
Eternal asked 24/5, 2013 at 1:45

3

What is the best way to construct sql with various number of WHERE conditions ? My solution looks ugly: my ($where, @values); if ($phone_number) { $where = 'AND pnone_number=?'; @values = ($from...
Lanoralanose asked 20/5, 2013 at 7:57

6

I'm attempting to get DBD::MySQL working on Snow Leopard (v10.6.6). The default version of Perl that comes with the OS is v5.10.0. Since I've read that's 64-bit, I went ahead and downloaded and ins...
Emarie asked 27/1, 2011 at 20:59

2

At work we have a DBA who said his RAC working just fine, but the truth is it isn't. SQL IDEs like Toad or SQL Developer randomly dropping their connections (my suspicion is becouse of the inrorrec...
Changeful asked 7/2, 2013 at 19:21

4

Solved

I have a .accdb file on my local machine and I am trying to connect to it and read some data from 3 tables within the DB. How do I establish the connection using Perl? So far I have scraped togeth...
Zoophilous asked 30/10, 2009 at 18:39

3

Solved

disconnect invalidates 1 active statement handle (either destroy statement handles or call finish on them before disconnecting) The following code which grabs data from MySQL gets executed s...
Mauretta asked 12/2, 2009 at 14:39

1

Solved

I'm having some memory leak issues in a perl script that I'm running for extended periods of time, where the amount of memory that perl is taking up just continues to grow. Because of this, I am tr...
Cobbie asked 12/11, 2012 at 4:16

1

Solved

I ran into a problem when running code similar to the following example: my $rows = $dbh->do('UPDATE table SET deleted=NOW() WHERE id=?', undef, $id) or die $dbh->errstr; if (!$rows) { # ...
Wolff asked 13/11, 2012 at 10:8

7

Solved

I'm trying to basically do a search through the database with Perl to tell if there is an item with a certain ID. This search can return no rows, but it can also return one. I have the following c...
Stettin asked 13/1, 2009 at 21:8

4

sorry for my noob question, I'm currently writing a perl web application with sqlite database behind it. I would like to be able to show in my app query results which might get thousands of rows - ...
Natalianatalie asked 22/10, 2012 at 16:56

3

Solved

I want to insert null in a column in a table. Which one represents null? undef or empty string ''. Which one should be used and Why? I know about defined and that I can check it. But I am lookin...
Indisposed asked 3/10, 2012 at 12:37

1

Solved

I have a need to be able to issue "create trigger" over DBI. I can't seem to get the delimiter command working. Can anyone find a way to make this work? Code: use strict; use DBI; my $dbargs = {m...
Friseur asked 14/9, 2012 at 1:41

1

Solved

I am running Perl 5.10 on Ubuntu 10.04 and using perl DBI module. I am trying to use the "AND" condition in "WHERE" clause in SQL Query under Perl DBI. I am using the DBD::CSV driver. Please conso...
Wellknit asked 28/8, 2012 at 17:1

3

Solved

I'm trying to execute the following script: #!/usr/bin/perl -w use strict; use DBI; my $db = "Pg"; my $db_database = "whatever"; my $user = "whatever"; my $password = "whatever"; my $dbh = DBI-...
Monia asked 18/5, 2012 at 21:4

1

Solved

I'm trying to sort our some legacy code that serves two purposes. It uses DBI to create a database and later uses DBI to connect to that database. Unfortunately, it used the same code for each. Tha...
Eleazar asked 4/5, 2012 at 12:53

4

Solved

I have a Perl script that uses a DBI connection. I open and read the SQL script file using a sub routine. I am printing only one record, where I should have two more (three records total). How do I...
Caressive asked 20/4, 2012 at 20:3

2

Solved

I'm working in a Perl script and I'd like to use named parameters to perform a query in a Postgres database. The DBI documentation says that's not portable: Some drivers also allow placeholders ...
Impressionism asked 23/3, 2012 at 19:58

5

Solved

I have a Postgres table with more than 8 million rows. Given the following two ways of doing the same query via DBD::Pg, I get wildly different results. $q .= '%'; ## query 1 my $sql = qq{ SELEC...
Recur asked 13/2, 2012 at 23:16

3

Solved

I'm have Perl 5.8 installed on all of our servers and wanted to use the DBI and DBD::Oracle modules to access our databases. My main concern is with the newer versions of perl the DBI and DBD modul...
Frieda asked 26/1, 2012 at 23:9

4

With DBI is there a way to determine if an executed statement handle for a SELECT statement will return any rows without fetching from it? I.e. something like: use DBI; ... my $sth = $dbh->pre...
Anemology asked 18/1, 2012 at 23:20

1

Solved

Is it somehow possible to use named placeholders where DBI allows @bind_values? E. g., I would like to make statements like: my $s = $DB->selectcol_arrayref ("SELECT a FROM b WHERE c = ? OR d ...
Sublease asked 25/12, 2011 at 0:10

3

Solved

Has anyone seen a DBI-type module for Perl which capitalizes, easily, on MySQL's multi-insert syntax insert into TBL (col1, col2, col3) values (1,2,3),(4,5,6),...? I've not yet found an interfa...
Marmolada asked 7/12, 2011 at 19:59

1

Solved

When dealing with persistant MySQL connections, the one problem is that they get dropped after a certain timeout (usually 28800 seconds). DBIx::Connector seems to do the job of automatically reconn...
Nerti asked 2/12, 2011 at 8:0

© 2022 - 2024 — McMap. All rights reserved.