> "Mike" == MikeBlezien <[EMAIL PROTECTED]> writes:
Mike> Yes, where using MySQL version 3.23.37 w/DBI 1.14
This is a case where using Perl and DBI is massive overkill. You can
do this with one line of MySQL SQL:
UPDATE TABLE Users SET Password = ENCRYPT(Password) WHERE Id > 1;
(Assu
> "Laurie" == Laurie Gennari <[EMAIL PROTECTED]> writes:
Laurie> I'm sure I must be missing something obvious (it's been one of
Laurie> those weeks), but I can't for the life of me figure out why
Laurie> this doesn't work. It just hangs and never finishes. Any help
Laurie> would be much appre
> "Anurag" == Anurag Minocha <[EMAIL PROTECTED]> writes:
Anurag> Is it possible to load from a flat file into an oracle table
Anurag> using perl. The data fields is in fixed form length and the
Anurag> load is a conditional load.
[...]
Anurag> The script should load only thows rows where th
> "Marty" == Marty Keane <[EMAIL PROTECTED]> writes:
Marty> The end result in oracle is that I have the entire result set
Marty> in memory and can skip around, back and forth (so-to-speak)
Marty> through the data. I've used fetchall_arrayref with a foreach
Marty> loop in the past with perl/db
> "XD" == Xiaoxia Dong <[EMAIL PROTECTED]> writes:
XD>$sql = "UPDATE uptime SET up_time=$uphours
XD> WHERE hostname = $host and
XD> startdate between
XD> (TO_DATE('$yy:$month:$sday:$shour:$sminute:00',
XD>
Continuing the ongoing saga... I wrote that the "top-n" queries in
Oracle can be handled by using a nested SELECT with an ORDER BY, then
using ROWNUM in the external WHERE clause. But...
> I just tried it on our instance and it doesn't work. We are on
> Oracle7 Server Release 7.3.4.5.0. Is t
> "Dawa" == Dawa Lama <[EMAIL PROTECTED]> writes:
Dawa> What would PostgreSQL return for empty table or when the SELECT
Dawa> doesn't find any item specified in the condition.
I'm unfamiliar with the "fetchrow" method.
My preferred method is to use "fetch", which will return an array
refere
>>>>> "Bill" == Bill OConnor <[EMAIL PROTECTED]> writes:
Bill> I want to use a subset of the selected rows on a webpage. For
Bill> instance if the query returns 100 rows I want show just 10 of
Bill> them on the page, 11-20 on the next etc.
>>>&g
> "Bill" == Bill OConnor <[EMAIL PROTECTED]> writes:
Bill> I want to use a subset of the selected rows on a webpage. For
Bill> instance if the query returns 100 rows I want show just 10 of
Bill> them on the page, 11-20 on the next etc.
Look at the discussion of the ROWNUM pseudo-column, in
> "Duncan" == Duncan Hudson <[EMAIL PROTECTED]> writes:
Duncan> Hi, I'm having problem's trying to dynamically create an IN
Duncan> statement for MySQL.
This is a bit of an FAQ. Please see the threads at:
http://www.mail-archive.com/dbi-users%40perl.org/msg00202.html
http://www.mail-
> "David" == Nguyen, David M <[EMAIL PROTECTED]> writes:
David> I am tasked to design a database so people can open a ticket,
David> modify/close as need. Does someone ever do this with DBI and
David> Oracle database? Is there any good resource I can go for demo?
It's almost certain that s
I wrote:
>> Then you can grab the matching businesses by joining against this
>>
>> table:
>> | SELECT bi.*
>> | FROM bus_info bi, bus_search_words bsw
>> | WHERE bsw.bus_id = bi.bus_id
>> | AND bsw.search_word = 'target'
>>
>> Variations on this (probably adding DISTINCT or GROUP BY w
> "Mike" == MikeBlezien <[EMAIL PROTECTED]> writes:
Mike> I am trying to put together a SELECT query to perform a search
Mike> on a column with various keywords. The column(searchwords) has
Mike> keywords something like this: (keyword1 keyword2 keyword3..etc)
Mike> separated by a space.
Thi
> "Sean" == Sean Cooper <[EMAIL PROTECTED]> writes:
Sean> I have a group of records as keys of a hash. because I can't
Sean> sort the values in the hash I'd like to use ORDER BY to sort the
Sean> values after I've retrieved them:
Depending on how many records you have in your hash, you can a
Since I've already gotten two replies off the list about this issue, I
thought I'd just forward on the response I sent to Marcelo in private.
I realize that this is really an Oracle question, not a Perl or Perl
DBI question; apologies in advance if this offends anyone.
Thanks,
t.
> "Marcelo"
> "Marcelo" == Marcelo Guelfi <[EMAIL PROTECTED]> writes:
Marcelo> I resolved it setting the NLS_DATE_FORMAT in my program.
Yes, this is a useful setting. (Although, almost anything would be
better than the default Oracle date format, IMNSHO...)
Marcelo> About the performance in your queri
> "Guru" == Guru Prasad <[EMAIL PROTECTED]> writes:
Guru> the field 'id' is of type CHAR(5). I didn't get any records (
Guru> when i am sure that the data is available for '1001' ). If i
Guru> changed the data type to VARCHAR(5), it is working fine. Why is
Guru> it so ?
This is indeed becomi
> "David" == David Jacobowitz <[EMAIL PROTECTED]> writes:
David> I have constructed an array using my table field names and
David> trying to pass that array in the select statement.
David> @inc_re = ( Hotels, Asian_Real_Estate, Smart_Buildings, Real_Estate,
David> Senior_Living_Homes );
Th
> "Marcelo" == Marcelo Guelfi <[EMAIL PROTECTED]> writes:
Marcelo> I'm having problems to fetch rows when the 'select' clause
Marcelo> has a where condition with 'date' types columns.
I've taken to either using TO_DATE('$date_string', '$date_format'), or
setting NLS_DATE_FORMAT to a reasona
> "Randy" == Randy Peterman <[EMAIL PROTECTED]> writes:
Randy> Is my problem with MS Access, or is there formatting to be done to the
Randy> fields. I am using CGI.pm as well to process all the returned values,
Randy> does this cause any undesired changes to the values? Could the comma
R
> "Rolf" == Rolf Kamp <[EMAIL PROTECTED]> writes:
Rolf> I have a method in a type that I invoke to return one and only
Rolf> one row with just one value. As with Perl, there's more thatn
Rolf> one way to do it and I want to make sure I use the best
Rolf> (fastest/most efficient) way to get th
> "Robb" == Robb Garrioch <[EMAIL PROTECTED]> writes:
Robb> Does anyone know of a DBI method ~or~ MySQL specific way that
Robb> would retrieve the column names of a MySQL database.table
Robb> dynamically within a Perl script using DBI? or Oracle if known.
Probably the most portable way to do
> "David" == Furber, David <[EMAIL PROTECTED]> writes:
David> (If anyone has a reliable rule I'd love to see it).
I'm not sure how comprehensive the Outlook rule capabilities are, but
here are my procmail rules for dbi-users:
| :0:$IC_LOCK_PREFIX/dbi.users.spool
| * ^X-List-ID:
| dbi.users
> "Michelle" == Michelle Gerfort <[EMAIL PROTECTED]> writes:
Michelle> I'm having a problem when using fetchrow_array().
When I worry about NULLs in column, I find that using plain old
"fetch" lets me construct a much simpler outer loop. If I need to
grab individual elements later, or build
> "Tim" == Tim Bunce <[EMAIL PROTECTED]> writes:
Tim> I think in very recent Oracle's there's an SQL command (probably
Tim> 'SET ...') that lets you switch default schema.
Is this what you are thinking of?
ALTER SESSION SET CURRENT_SCHEMA =
We use "ALTER SESSION" extensively in ou
> "Scott" == Purcell, Scott <[EMAIL PROTECTED]> writes:
Scott> Can one use placeholders in a update on the Microsoft SQL 7.0
Scott> server?
Presumably, the same way you do it against any other SQL back end.
Scott> The example from earlier shows the following:
Scott>UPDATE ANTIQUES SET
> "Mickey" == Mickey Mestel <[EMAIL PROTECTED]> writes:
Mickey> also, how can you find out the dbi and dbd version in an
Mickey> installed system?
There are probably better ways (investigate CPAN::shell, for
instance), but this does the trick:
| $ perl -le 'for (@ARGV) { eval "require $_";
> "Michael" == Michael Peppler <[EMAIL PROTECTED]> writes:
Michael> I believe that SQL-92 mandates that a non-null string be at
Michael> least one character in length.
Interesting. The Oracle docs say:
Oracle currently treats a character value with a length of zero as
null. However,
> "Hans-J" == Hans-J Krause <[EMAIL PROTECTED]> writes:
Hans-J> A database *never* should accept an insert of an empty string
Hans-J> in a not null column - otherwise what for should a
Hans-J> not-null-check to be set?
If you said "Oracle database", I'd agree. (And, given the rest of
your
Another way to construct a reasonable "IN" clause is to use the
DBI::quote method:
| my @vals = ('foo', "bar", "baz's");
| my $set = join ', ', map $dbh->quote($_), @vals;
| my $sql = "SELECT whatever FROM wherever WHERE somecolumn IN ($set)";
Note that this will properly handle the single qu
> "Paulo" == Paulo Castro <[EMAIL PROTECTED]> writes:
Paulo> I am in a great trouble inserting a DATETIME value in a mySQL
Paulo> table from a perl script.
As described in the info page "(mysql)Column types":
| `DATETIME'
| A date and time combination. The supported range is `'1000-01
31 matches
Mail list logo