[23599] in Perl-Users-Digest
Perl-Users Digest, Issue: 5806 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Nov 15 00:05:55 2003
Date: Fri, 14 Nov 2003 21:05:07 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Fri, 14 Nov 2003 Volume: 10 Number: 5806
Today's topics:
Re: (exit $?0) - challenge <bmb@ginger.libs.uga.edu>
Re: ALRM weirdness in Perl 5.8.0 <andy@andyh.co.uk>
Re: arrange form data in same order as on form <jwillmore@remove.adelphia.net>
Re: arrange form data in same order as on form (Tad McClellan)
Re: arrange form data in same order as on form <me@privacy.net>
Re: arrange form data in same order as on form <noreply@gunnar.cc>
Re: Giving back (Sam Holden)
Re: Giving back (Tad McClellan)
Re: Giving back (Tad McClellan)
Re: Giving back (Tad McClellan)
Re: Giving back <jwillmore@remove.adelphia.net>
Re: Giving back (Tad McClellan)
Re: Giving back <tcurrey@no.no.i.said.no>
Re: Giving back <noreply@gunnar.cc>
Re: last index of array reference <bmb@ginger.libs.uga.edu>
Re: List into hash <bmb@ginger.libs.uga.edu>
Re: my command (sorry newbe question) <bmb@ginger.libs.uga.edu>
Re: ParseRecur from Date::Manip <theaney@cablespeed.com>
Programming Pointer <reachus@netlink.info>
Re: Programming Pointer (William Herrera)
Re: small dbi help <spam@thecouch.homeip.net>
Re: small dbi help <gpatnude@adelphia.net>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 14 Nov 2003 21:54:56 -0500
From: Brad Baxter <bmb@ginger.libs.uga.edu>
Subject: Re: (exit $?0) - challenge
Message-Id: <Pine.A41.4.58.0311142153070.17570@ginger.libs.uga.edu>
On Fri, 14 Nov 2003, Ben Morrow wrote:
> Ara.T.Howard@noaa.gov wrote:
> > | The difference between art and science is that science is what we
> > | understand well enough to explain to a computer.
> > | Art is everything else.
> > | -- Donald Knuth, "Discover"
>
> I should trim that down a bit... I believe four lines is normally
> considered sufficient.
I like that part. :-)
Regards,
Brad
------------------------------
Date: Sat, 15 Nov 2003 00:39:03 +0000
From: Andy Hassall <andy@andyh.co.uk>
Subject: Re: ALRM weirdness in Perl 5.8.0
Message-Id: <m5tarv0ukcjjhbl9l17sjjc2s4tl1e4hua@4ax.com>
On Fri, 14 Nov 2003 23:12:36 +0100, "Mark" <admin@asarian-host.net> wrote:
>I suspect it has something to do with the new "safe signals", which, if I
>understood it correctly, may cause a signal to your process to be delayed
>until a "safe" moment arrives.
Thanks for the pointer - it looks like that's the cause of my problems. With
PERL_SIGNALS environment variable set to 'unsafe' I get the alarm interrupting
connections that are taking too long, at least under Linux. Looks like it's got
to be set before Perl starts up; it has no apparent effect with a 'local' in
the eval(). Have to try this out back on Solaris at the office next week.
--
Andy Hassall (andy@andyh.co.uk) icq(5747695) (http://www.andyh.co.uk)
Space: disk usage analysis tool (http://www.andyhsoftware.co.uk/space)
------------------------------
Date: Fri, 14 Nov 2003 23:50:21 GMT
From: James Willmore <jwillmore@remove.adelphia.net>
Subject: Re: arrange form data in same order as on form
Message-Id: <20031114184548.66557ffe.jwillmore@remove.adelphia.net>
THIS is top posting. Please don't do this.
On Fri, 14 Nov 2003 06:04:34 GMT
"bbxrider" <bxtrap01@comcast.net> wrote:
> what is 'top-post' ???
> actually don't understand how the eric roode and first sinan unur
> posts were not subordinated to the post immediately above them,
> i simply use reply-to-group and it always subordinates to the post
> i'm responding to
Please read the posting guidelines for this group
http://mail.augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html
<snip - because there is NO reason to repost EVERYTHING from the
thread>
--
Jim
Copyright notice: all code written by the author in this post is
released under the GPL. http://www.gnu.org/licenses/gpl.txt
for more information.
a fortune quote ...
Cinemuck, n.: The combination of popcorn, soda, and melted
chocolate which covers the floors of movie theaters. -- Rich
Hall, "Sniglets"
------------------------------
Date: Fri, 14 Nov 2003 19:17:20 -0600
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: arrange form data in same order as on form
Message-Id: <slrnbravl0.ou4.tadmc@magna.augustmail.com>
bbxrider <bxtrap01@comcast.net> wrote:
> what is 'top-post' ???
http://www.catb.org/~esr/jargon/html/T/top-post.html
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Sat, 15 Nov 2003 17:06:14 +1300
From: "Tintin" <me@privacy.net>
Subject: Re: arrange form data in same order as on form
Message-Id: <bp48pa$1ke2oq$1@ID-172104.news.uni-berlin.de>
"Gunnar Hjalmarsson" <noreply@gunnar.cc> wrote in message
news:bp2opd$1jtuap$1@ID-184292.news.uni-berlin.de...
>
> To me, a piece of code that does what it's _intended_ to do is not
> "buggy". It may have _limitations_, but limitations and bugs are not
> the same thing.
>
> If I want my program to print today's date in ISO 8601 format, I may
> use this code:
>
> my $time = time;
> sub myDate {
> my @t = (gmtime $time)[3..5];
> sprintf '%d-%02d-%02d', $t[2] += 1900, ++$t[1], $t[0];
> }
> print myDate();
>
> I could have used your Time::Format module instead, but if I don't
> need a variety of date and time formats in my program, I wouldn't
> likely have done so.
>
> Time::Format includes some nice tools for time formating, no doubt.
> Nevertheless, that fact wouldn't make you claim that my myDate()
> function is "buggy", right?
Your analogy is not a good one. An ISO8601 date format has very rigid
parameters, whereas CGI data is by its very nature, variable.
------------------------------
Date: Sat, 15 Nov 2003 05:55:32 +0100
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: arrange form data in same order as on form
Message-Id: <bp4c2u$1k3umr$1@ID-184292.news.uni-berlin.de>
Tintin wrote:
> Gunnar Hjalmarsson wrote:
>> To me, a piece of code that does what it's _intended_ to do is
>> not "buggy". It may have _limitations_, but limitations and bugs
>> are not the same thing.
>>
>> If I want my program to print today's date in ISO 8601 format, I
>> may use this code:
>>
>> my $time = time;
>> sub myDate {
>> my @t = (gmtime $time)[3..5];
>> sprintf '%d-%02d-%02d', $t[2] += 1900, ++$t[1], $t[0];
>> }
>> print myDate();
>>
>> I could have used your Time::Format module instead, but if I
>> don't need a variety of date and time formats in my program, I
>> wouldn't likely have done so.
>>
>> Time::Format includes some nice tools for time formating, no
>> doubt. Nevertheless, that fact wouldn't make you claim that my
>> myDate() function is "buggy", right?
>
> Your analogy is not a good one. An ISO8601 date format has very
> rigid parameters, whereas CGI data is by its very nature, variable.
True, but all potential variations are not applicable in all programs
that parse CGI data. For instance, if you want that a program only
parses POSTed data, it's not buggy because it isn't prepared to handle
potential variations in data submitted via GET. Limited? Yes.
Unflexible? Yes. Buggy? No.
The only point with my example was to illustrate that distinction.
Call a spade a spade! :)
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
------------------------------
Date: 14 Nov 2003 23:37:07 GMT
From: sholden@flexal.cs.usyd.edu.au (Sam Holden)
Subject: Re: Giving back
Message-Id: <slrnbrapp3.umn.sholden@flexal.cs.usyd.edu.au>
On 14 Nov 2003 06:49:22 -0800, Sara <genericax@hotmail.com> wrote:
> tadmc@augustmail.com (Tad McClellan) wrote in message news:<slrnbr7p2e.lqd.tadmc@magna.augustmail.com>...
>> [Please limit your line lengths to the conventional 70-72 characters]
>>
>>
> .
> .
> .
>
> Really Tad,
>
> [Please use a news reader from this century]..
>
> This convention arose from punchcards which had, if I recall, 80
> columns, 8 of which were special? I'd like to believe we've progressed
> a bit since then.
No, but a significant number of people use terminals which are around 80
characters wide (mine are 84, for example, since that allows two of them
to fit side by side on my small monitor with a readable font). The 70-72
comes from leaving room for a few levels of quoting.
> I know traintracks use their width as a legacy handed down from Roman
> Wagons (at least that's the conventional wisdom), but let's TRY to be
> a little more progressive in our industry?
You can post so that your posts are hard to read for a large number of
people. After all they really don't mind not reading your posts.
--
Sam Holden
------------------------------
Date: Fri, 14 Nov 2003 17:19:29 -0600
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Giving back
Message-Id: <slrnbraoo1.og1.tadmc@magna.augustmail.com>
Sara <genericax@hotmail.com> wrote:
> tadmc@augustmail.com (Tad McClellan) wrote in message news:<slrnbr7p2e.lqd.tadmc@magna.augustmail.com>...
>> [Please limit your line lengths to the conventional 70-72 characters]
> [Please use a news reader from this century]..
What makes you think that my newsreader is not from this century?
> This convention arose from
[snip]
Doesn't matter where it came from, the fact remains that
it _is_ the convention.
If that is what folks like, then why not simply give it to them?
Be nice.
Socially unacceptable behavior may lead to the OP getting less
answers to future questions, and I didn't want that to happen.
I do not have that same conviction regarding your postings.
So long.
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Fri, 14 Nov 2003 17:22:23 -0600
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Giving back
Message-Id: <slrnbraotf.og1.tadmc@magna.augustmail.com>
James Willmore <jwillmore@remove.adelphia.net> wrote:
> In fact, COBOL (which has been around for a good many years and is
> still in use today) *requires* that you not exceed 72 characters for
> your code. Maybe this is where the 8 "special" characters comes from?
No, it is so that it will still fit in an 80-column terminal after
being quoted a couple of times.
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Fri, 14 Nov 2003 17:40:22 -0600
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Giving back
Message-Id: <slrnbrapv6.og1.tadmc@magna.augustmail.com>
Default@User011011101101.net <Default@User011011101101.net> wrote:
> That website was very helpfull indeed.
What website?
> And thanks for the suggestions,
What suggestions?
Please post a little quoted text to show context in followups.
Have you seen the Posting Guidelines that are posted here frequently?
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Sat, 15 Nov 2003 01:03:16 GMT
From: James Willmore <jwillmore@remove.adelphia.net>
Subject: Re: Giving back
Message-Id: <20031114195843.47f8914a.jwillmore@remove.adelphia.net>
On Fri, 14 Nov 2003 17:22:23 -0600
tadmc@augustmail.com (Tad McClellan) wrote:
> James Willmore <jwillmore@remove.adelphia.net> wrote:
>
> > In fact, COBOL (which has been around for a good many years and is
> > still in use today) *requires* that you not exceed 72 characters
> > for your code. Maybe this is where the 8 "special" characters
> > comes from?
>
>
> No, it is so that it will still fit in an 80-column terminal after
> being quoted a couple of times.
<ot>
Are you refering to columns 73-80 (inclusive) in COBOL? They are
optional in COBOL (now). ISPF will only do 72 columns in length. In
the days of keypunch cards, 73-80 is where the program name would go -
so if you droped the cards, you at least had a fighting chance to get
them back in some order. IBM mainframes (S390, 370, etc.) will only
do jobnames in 8 alpha-numeric characters, AFAIK. So, it only makes
sense that ISPF only shows columns 1-72 - especially since columns
73-80 are optional now and keypunch cards are a thing of the past.
I should have not even mentioned ISPF or COBOL at all. Sorry :-(
</ot>
Basically, I was trying to support the idea of having posters post in
the length of 72 columns. I can't stand scrolling back and forth to
read a message and it pisses me off when someone trys to justify
posting any old way they please.
Sorry for the confussion.
--
Jim
Copyright notice: all code written by the author in this post is
released under the GPL. http://www.gnu.org/licenses/gpl.txt
for more information.
a fortune quote ...
You might have mail
------------------------------
Date: Fri, 14 Nov 2003 19:13:52 -0600
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Giving back
Message-Id: <slrnbraveg.ou4.tadmc@magna.augustmail.com>
James Willmore <jwillmore@remove.adelphia.net> wrote:
> On Fri, 14 Nov 2003 17:22:23 -0600
> tadmc@augustmail.com (Tad McClellan) wrote:
>> James Willmore <jwillmore@remove.adelphia.net> wrote:
>>
>> > In fact, COBOL (which has been around for a good many years and is
>> > still in use today) *requires* that you not exceed 72 characters
>> No, it is so that it will still fit in an 80-column terminal after
>> being quoted a couple of times.
>
><ot>
> Are you refering to columns 73-80 (inclusive) in COBOL?
No, I'm referring the most common character width of terminals.
> Basically, I was trying to support the idea of having posters post in
> the length of 72 columns.
Yes, I know.
> I can't stand scrolling back and forth to
> read a message
Me either, so I don't read it at all (usually).
> and it pisses me off when someone trys to justify
> posting any old way they please.
Me too, so I killfile them (always):
% whiners
Score:: -9998
[snip about 40 addresses]
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Fri, 14 Nov 2003 18:36:05 -0800
From: "Trent Curry" <tcurrey@no.no.i.said.no>
Subject: Re: Giving back
Message-Id: <bp43jj$m7$1@news.astound.net>
Ben Morrow wrote:
> genericax@hotmail.com (Sara) wrote:
>> tadmc@augustmail.com (Tad McClellan) wrote in message
>> news:<slrnbr7p2e.lqd.tadmc@magna.augustmail.com>...
>>> [Please limit your line lengths to the conventional 70-72
>>> characters]
>>
>> Really Tad,
>>
>> [Please use a news reader from this century]..
>
> Tad appears to use slrn, the latest release of which was made on
> 2003-08-25.
>
>> This convention arose from punchcards which had, if I recall, 80
>> columns, 8 of which were special? I'd like to believe we've
>> progressed
>> a bit since then.
>
> The convention arises from those of us who use 80x25 consoles or
> terminal windows, to allow for a few levels of '> > ' before lines
> wrap.
Just a little question, why do newer readers use > > > instead of >>> which
gives more room for quoted text? It seems to me more and more readers use
this for now instead of the spaced out version. Just wondering.
--
Trent Curry
perl -e
'($s=qq/e29716770256864702379602c6275605/)=~s!([0-9a-f]{2})!pack("h2",$1)!eg
;print(reverse("$s")."\n");'
------------------------------
Date: Sat, 15 Nov 2003 04:34:03 +0100
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Giving back
Message-Id: <bp479t$1k2vea$1@ID-184292.news.uni-berlin.de>
Trent Curry wrote:
> Just a little question, why do newer readers use > > > instead of
> >>> which gives more room for quoted text? It seems to me more and
> more readers use this for now instead of the spaced out version.
> Just wondering.
Is that so? In that case, fewer and fewer developers read and/or care
to comply with applicable standards, such as RFC2646. Sad!
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
------------------------------
Date: Fri, 14 Nov 2003 22:21:48 -0500
From: Brad Baxter <bmb@ginger.libs.uga.edu>
Subject: Re: last index of array reference
Message-Id: <Pine.A41.4.58.0311142206510.17570@ginger.libs.uga.edu>
On Thu, 13 Nov 2003, Ryan Travis Tate wrote:
> Ryan Tate <ryantate@ryantate.com> wrote:
> | At this point, in my code, which must run under taint mode, I have
> | reverted to using ((length @$arrayref) - 1).
>
> Erm, after re-reading the thread, I have switched to the significant
> less brain dead $#{$arrayref}, which seems to work just fine, taint or
> no. No point, I suppose, worrying why the other version works in some
> cases but not others. IIRC & FWIW, the only reason I thought to do it
> that way was I saw someone else do something like $#{1 .. 3}, which as
> it turns out itself produces interesting results.
Or simply $#$arrayref.
perl -le '$arrayref=[1,2,3];print $#$arrayref' prints "2"
Perhaps beside the point:
perl -le 'print $#{[1..3]}' prints "2"
perl -le 'print $#{1 .. 3}' prints "-1"
perl -le 'print $#{1}' prints "-1"
Curious.
I see in perldoc pervar:
The following are equivalent:
@whatever = ();
$#whatever = -1;
But I'm not sure I'm enlightened. :-)
Regards,
Brad
------------------------------
Date: Fri, 14 Nov 2003 22:34:09 -0500
From: Brad Baxter <bmb@ginger.libs.uga.edu>
Subject: Re: List into hash
Message-Id: <Pine.A41.4.58.0311142228090.17570@ginger.libs.uga.edu>
On Fri, 14 Nov 2003, Tore Aursand wrote:
> On Thu, 13 Nov 2003 14:42:32 -0800, Randy wrote:
> > I am trying to take a list of domains and put them into a listing and
> > keep track of how many are repeated.
>
> my %domains = ();
> foreach ( @domain ) { # @domain is defined elsewhere
> $domains{$_}++;
> }
perl -wlpe '$_{$_}++}{$_="@{[%_]}"' domainlist
or perhaps
perl -walpe 'map{$_++}@_{@F}}{$_="@{[%_]}"' domainlist
Regards,
Brad
------------------------------
Date: Fri, 14 Nov 2003 21:50:15 -0500
From: Brad Baxter <bmb@ginger.libs.uga.edu>
Subject: Re: my command (sorry newbe question)
Message-Id: <Pine.A41.4.58.0311142146310.17570@ginger.libs.uga.edu>
On Wed, 12 Nov 2003, Chris Mattern wrote:
> Chris Lynch wrote:
> > You don't always need the "my" when you declare a variable.
>
> If you program with strict (and you should *always* program with
> strict), then you will need *something*--my, our, global, whatever...
my, our, local, PACKAGE::, what else?
Regards,
Brad
------------------------------
Date: Fri, 14 Nov 2003 19:26:12 -0500
From: Tim Heaney <theaney@cablespeed.com>
Subject: Re: ParseRecur from Date::Manip
Message-Id: <878ymih3yz.fsf@mrbun.watterson>
Kien Ha <kha@rogers.com> writes:
> Arndt, Tobias wrote:
>> Hi NG,
>> trying to understand the ParseRecur function. Seems to be too complex
>> for me. My goal is to get the first Monday from each month of the year
>> 2003. My code:
>> @date = ParseRecur("0:1*1:1:0:0:0","1/1/03","1/1/03","31/12/03");
> you wouldn't get any output for @date because of ^^ ^^
You can ask Date::Manip to use this format, if you want.
Date_Init("DateFormat=non-US");
Tim
------------------------------
Date: Fri, 14 Nov 2003 21:34:18 -0500
From: "Gary" <reachus@netlink.info>
Subject: Programming Pointer
Message-Id: <Pggtb.4025$HD3.2728@lakeread06>
I have a simple cgi in perl that basically dumpls a file to the screen from
an SQL database and every field can be chaged. Once I have written the rows
to the screen, and the user has changed potentially several rows, what is
the easiest way to update the database with the new entries ?
Basically existing Perl program looks like this.
# make connection to database
$dbh = DBI->connect($connectionInfo,$userid,$passwd);
# prepare and execute query
$query = "SELECT * FROM WGTextDescription";
$sth = $dbh->prepare($query);
$sth->execute();
# assign fields to variables
$sth->bind_columns(\$QId, \$QSId, \$Description);
$V1=1;
while($sth->fetch()) {
print "<tr><td><input type=hidden name=A$V1 value=$QId>$QId<td><input
type=hidden name=B$V1 value=QSId>$QSId<td><input type=textbox
value=$Description name=D$V1>\n";
$V1=$V1+1;
}
QId and QSId are keys on the file which do not need to be displayed, but
$Description can be changed and needs to be stored after alteration.
The crude way would be as I have done which is to assign each field output
to the screen a code (A$V1) which later I can loop through and use to update
the relevant database rows, BUT there must be a cleaner method -
Any help appreciated.
20+ years programming experience but not in Perl.
Thanks
Gary
------------------------------
Date: Sat, 15 Nov 2003 04:57:35 GMT
From: wherrera@lynxview.com (William Herrera)
Subject: Re: Programming Pointer
Message-Id: <3fb5b274.353924451@news2.news.adelphia.net>
On Fri, 14 Nov 2003 21:34:18 -0500, "Gary" <reachus@netlink.info> wrote:
>I have a simple cgi in perl that basically dumpls a file to the screen from
>an SQL database and every field can be chaged. Once I have written the rows
>to the screen, and the user has changed potentially several rows, what is
>the easiest way to update the database with the new entries ?
>
>Basically existing Perl program looks like this.
>
># make connection to database
>$dbh = DBI->connect($connectionInfo,$userid,$passwd);
>
># prepare and execute query
>$query = "SELECT * FROM WGTextDescription";
>
>
The problem is not Perl DBI, you have that down, more or less. It's that you
want a nice GUI interface for updates? And don't feel like drawing one up
yourself?
Look at some of the existing interfaces, eg
http://www.cgiscriptshop.com/products/mdm/index.html
and maybe use some of those ideas.
---
Use the domain skylightview (dot) com for the reply address instead.
------------------------------
Date: Fri, 14 Nov 2003 19:27:34 -0500
From: Mina Naguib <spam@thecouch.homeip.net>
Subject: Re: small dbi help
Message-Id: <Poetb.10147$ML4.199670@wagner.videotron.net>
-----BEGIN xxx SIGNED MESSAGE-----
Hash: SHA1
Tore Aursand wrote:
> On Tue, 11 Nov 2003 23:29:36 -0500, Mina Naguib wrote:
>
>>3. Try "where emp_no in ('x', 'y', 'z', . . .)" - I don't know how
>>efficient oracle is with this type of query, but it might be worth a
>>shot while you're benchmarking.
>
>
> A friend of mine did some work against Oracle once, and he encountered
> problems when the IN() expression contained more than x elements. I don't
> remember what the excact limit was, but I think it was about 1,000.
>
> Anyone have some more information on this? I have almost nevner used
> Oracle - and I don't have it available - so...
I ran into the same limit once too, I think it was either 100, 500 or 999 but I'm not sure.
If "in()" is found to be the way to go resource-and-speed-wise (I doubt it), then the limitation
could be easily worked around with perl with a while loop and splice.
-----BEGIN xxx SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQE/tXL2eS99pGMif6wRAkRNAJ9ZXmlqgqTm++oqcMLOET962AowCwCgi9cM
ag92mfourgzEOnnjHkEE8+8=
=UUGB
-----END PGP SIGNATURE-----
------------------------------
Date: Sat, 15 Nov 2003 01:34:26 GMT
From: "Greg Patnude" <gpatnude@adelphia.net>
Subject: Re: small dbi help
Message-Id: <Coftb.1205$m84.956903@news1.news.adelphia.net>
you might consider using a sub select...
"WHERE emp_no IN (SELECT emp_no FROM emp where condition)
--
Greg Patnude / The Digital Demention
2916 East Upper Hayden Lake Road
Hayden Lake, ID 83835
(208) 762-0762
"Mina Naguib" <spam@thecouch.homeip.net> wrote in message
news:Poetb.10147$ML4.199670@wagner.videotron.net...
> -----BEGIN xxx SIGNED MESSAGE-----
> Hash: SHA1
>
>
>
> Tore Aursand wrote:
> > On Tue, 11 Nov 2003 23:29:36 -0500, Mina Naguib wrote:
> >
> >>3. Try "where emp_no in ('x', 'y', 'z', . . .)" - I don't know how
> >>efficient oracle is with this type of query, but it might be worth a
> >>shot while you're benchmarking.
> >
> >
> > A friend of mine did some work against Oracle once, and he encountered
> > problems when the IN() expression contained more than x elements. I
don't
> > remember what the excact limit was, but I think it was about 1,000.
> >
> > Anyone have some more information on this? I have almost nevner used
> > Oracle - and I don't have it available - so...
>
> I ran into the same limit once too, I think it was either 100, 500 or 999
but I'm not sure.
>
> If "in()" is found to be the way to go resource-and-speed-wise (I doubt
it), then the limitation
> could be easily worked around with perl with a while loop and splice.
>
> -----BEGIN xxx SIGNATURE-----
> Version: GnuPG v1.2.3 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQE/tXL2eS99pGMif6wRAkRNAJ9ZXmlqgqTm++oqcMLOET962AowCwCgi9cM
> ag92mfourgzEOnnjHkEE8+8=
> =UUGB
> -----END PGP SIGNATURE-----
>
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V10 Issue 5806
***************************************