SQL query

2001-07-03 Thread Stacy Mader
Hi all, I have a table (report_response) which has (among others) fault_no and response_no fields. Now a fault_no can have multiple response_no's. The thing is, when I issue the following SQL: SELECT fault_no ,one_line_summary FROM report_response WHERE (reported_by LIKE '%J BLOGGS%' ) order

Re: Mysql DBI Select Syntax ?

2001-07-03 Thread About-tw.com
Dear Steven, Thanks for your opinion. Here is my complete example , my $dbh = DBI-connect(DBI:mysql:x,,, {RaiseError = 1 }); my $sth = $dbh-prepare( qq{ CREATE TABLE a1 (diploma ENUM(junior_high,senior_high,junior_college,university,master,doc tor) }); $sth-execute;

MS Access 2K Query problem and trace file

2001-07-03 Thread Jim Clark
Hi all, I can't get a simple query to work in DBI 1.14 / DBD ADO 1.17 / MDAC 2.6 SP1. Records with specific test values can be manually added into the Access table no problem. Deleting these test records and then trying to have Perl / DBI insert the same records results in a syntax error and the

Re: SQL query

2001-07-03 Thread Simon Oliver
Does your table have a submitted_date field or some other serialised or chronological field? If not your stuffed because RDBMs do not guarantee the order records are stored in. If you do have a submitted_date field then you can create a view that is grouped by max(submitted_date) and select

Re: Problems Running from crontab.

2001-07-03 Thread Scott T. Hildreth
I just changed the shell because our .zshenv has the enviorment variables setup. On 03-Jul-01 Alexander Farber (EED) wrote: Scott T. Hildreth wrote: I fixed it by setting the 'SHELL=/usr/local/bin/zsh' so the LD_LIBRARY_PATH is getting set before Perl is executed. Why not just set the

RE: Problems Running from crontab.

2001-07-03 Thread Scott T. Hildreth
How would this differ from when I set them in the code? I do have $ENV{ORACLE_HOME}, $ENV{ORACLE_SID}, $ENV{LD_LIBRARY_PATH} set in any code that runs from cron. On 02-Jul-01 Steve Sapovits wrote: You can do this nice little Perl trick: BEGIN { if

RE: SQL query

2001-07-03 Thread Steve Howard
What is the difference between the two records that cause the multiple lines to be returned? Is it a date, or something else? If you are looking for something to guarantee only the latest row is returned, you can use a SELECT...INTO and select into a temp table grouped by the key, and using a

RE: Mysql DBI Select Syntax ?

2001-07-03 Thread Steve Howard
In this case, I really think the question is one of database design. In the domain table you are creating to enumerate the types of degrees (a2), I would add a rank column so I could evaluate on the rank column, and join back to this domain table in queries where this evaluation needs to be

Re: Mysql DBI Select Syntax ?

2001-07-03 Thread John
=?utf-8?B?QWJvdXQtdHcuY29tIOWFjeiyu+S6uuWKm+mKgOihjA==? writes: Dear All, As I understand this, what you would really LIKE to do would be to sort/collate by the underlying numeric representation, rather than by the abstraction of the values provided through ENUM. Some rather sophisticated

The space of DBD::Oracle

2001-07-03 Thread Wesley STROOP
Hi all, Can anyone tell me how large Perl 5.6.1 , DBI-1.16 and DBD-Oracle1.06 is? Thanks, Wez

Re: Oracle, perl DBI under debian

2001-07-03 Thread Michael A. Chase
If you plan to run under WinNT, you should probably be using ActiveState Perl and their PPM to install DBI and DBD::Oracle. You will still need Oracle's SQL*Net client to actually connect to an Oracle database though and Oracle is the only source for that. -- Mac :}) ** I normally forward

Re: The space of DBD::Oracle

2001-07-03 Thread Michael A. Chase
That depends on too many factors to enumerate. Is there a reason you can't build them in an example of your target environment and see for yourself? -- Mac :}) ** I normally forward private questions to the appropriate mail list. ** Give a hobbit a fish and he eats fish for a day. Give a hobbit

getting return messages from non-selects in Informix

2001-07-03 Thread Curt Russell Crandall
I have a FCGI script that lets you enter an sql statement in a textbox and on submit the statement is submitted to the database. If it is a select statement, a table with the results is displayed. If it is not a select statement, the program simply prints an error that fetch* didn't work. I'd

RE: getting return messages from non-selects in Informix

2001-07-03 Thread Sterin, Ilya
Not sure about the attribute, but why not just use $DBI::errstr along with the return value. If an error is return you can display the $DBI::errstr if not, but no rows are returned/updated you can display the No rows found message yourself. Ilya -Original Message- From: Curt Russell

RE: getting return messages from non-selects in Informix

2001-07-03 Thread Wilson, Doug
Look at the perldoc for DBD::Informix, you have access to the sqlda structure. Or the do() and execute() methods return the number of rows affected. -Original Message- From: Curt Russell Crandall [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 03, 2001 9:15 AM To: [EMAIL PROTECTED]

links

2001-07-03 Thread Simon K. Chan
Hey Everybody, I have an online database where I use a CGI script that uses the DBI to return the values from Mysql. How do I return a link? For example, if I have a database for hockey players, and I return the name Wayne Gretzky. Is there a way to make that a link that will go to say,

RE: links

2001-07-03 Thread Jones Robert Contr 81 CS/SCK
If your DB has the name, link stored in it then just select both columns and then output them to your HTML formatted output. Small example: $sth=$dbh-do(select player, link from hockeylist); print qq!a href=$link$player/a!; -Original Message- From: Simon K. Chan [mailto:[EMAIL

Bind Parameters with MS Access

2001-07-03 Thread Ian Summers
Hi A lot is mailed on this list extolling the virtues of binding parameters. Can this be done with an MS Access Database? I just get an error. Ian

Re: Bind Parameters with MS Access

2001-07-03 Thread Mike Lacey
Ian, Could you post a little source code please? Just to demonstrate your error. Mike --- Mike Lacey www.tek-tips.com -- a friendly, flame free, environment for computer professionals and students Perl forum at: http://www.tek-tips.com/gthreadminder.cfm/lev2/4/lev3/32/pid/219 - Original

RE: links

2001-07-03 Thread Sterin, Ilya
Not sure what you are talking about. Where do you store the link? Evidently your script is not a mind reader and doesn't know the link until you tell it where to get it from. There are too many ways to approach this, I won't even get into this. It's all pretty much common sense. Ilya

RE: Bind Parameters with MS Access

2001-07-03 Thread Sterin, Ilya
What error do you get and what is your code? Ilya -Original Message- From: Ian Summers To: [EMAIL PROTECTED] Sent: 07/03/2001 6:22 AM Subject: Bind Parameters with MS Access Hi A lot is mailed on this list extolling the virtues of binding parameters. Can this be done with an MS

RE: links

2001-07-03 Thread gordon . dewis
Not really a DBI issue, but You need to store the URL in the database and retrieve it in the select that also returns the name of the player. Your CGI will have to build the HTML around the name when your producing the list of results. -Original Message- From: Simon K. Chan

Re: DBD::Oracle107 README, corrections

2001-07-03 Thread Tim Bunce
On Tue, Jun 19, 2001 at 01:24:36PM +0200, Axel Rose wrote: Hello Tim, please delete from the DBD::Oralce 1.07 README the URL to http://www.wmd.de/ I know for sure that the company wmd no longer exists. Thanks. I have a minor compilation problem and would like to search first in the

Re: Calling OCIPasswordChange using Perl

2001-07-03 Thread Tim Bunce
Patches welcome. Or trymessing with the next version of Oracle::OCI. Tim. On Tue, Jun 19, 2001 at 03:24:47PM -0700, Molina, Gerardo wrote: Has anyone figured out how to call OCIPasswordChange from Perl (with or without DBI)? The reason I'm asking that Oracle is saying that OCIPasswordChange

Re: DBD::_::db::type_info() slow

2001-07-03 Thread Tim Bunce
How many times was type_info() being called? Tim. On Mon, Jul 02, 2001 at 01:19:10PM -0500, Dean Kopesky wrote: Hi! While testing an application that generates SQL based on data extracted from a database, I noticed that almost 80% of the runtime was being consumed by DBI::db::quote(). A

RE: getting return messages from non-selects in Informix

2001-07-03 Thread Curt Russell Crandall
That's kind of like the workaround I have in now, but it's not the solution I really want... I would like to display verbatim the return message from Informix since there will be some commands issued where looking at the return value for the number of rows updated will be insufficient. Thanks,

RE: getting return messages from non-selects in Informix

2001-07-03 Thread Curt Russell Crandall
The perldoc I have does not refer to a sqlda structure, however it briefly talks about a sqlca structure... but I am unable to find the specific information I need. I'll have to track down the Informix manuals and look at this structure in there. Thanks, Curt On Tue, 3 Jul 2001, Wilson, Doug

Re: DBD::_::db::type_info() slow

2001-07-03 Thread Michael A. Chase
It sounded like he was calling it for nearly every value he was inserting into his SQL. A standard location for caching the type_info information would probably also help those DBDs that are simulating placeholders. -- Mac :}) ** I normally forward private questions to the appropriate mail list.

Re: Bind Parameters with MS Access

2001-07-03 Thread Ian Summers
Thanks for the response and the request for code. Original request: A lot is mailed on this list extolling the virtues of binding parameters. Can this be done with an MS Access Database? I just get an error. Answer: Yes, binding parameters work with MS Access. The real problem is that I'm

Re: DBD::_::db::type_info() slow

2001-07-03 Thread Dean Kopesky
It sounded like he was calling it for nearly every value he was inserting into his SQL. A standard location for caching the type_info information would probably also help those DBDs that are simulating placeholders. Yes, indirectly. I am calling quote() for every value, and quote() was

RE: Problem with Oracle Intermedia using DBI-DBD modules

2001-07-03 Thread Madani, Bardia (B.)
I am trying to work with Oracle Intermedia and DBI. I have posted this problem to DBI mailing list, unfortunately no one replied. I hope you can help me. Here is the issue: The Intermedia queries are little different from regular SQL statements. Example of Intermedia Query: [ select

Re: db2 recursive query with placeholder

2001-07-03 Thread db2perl
Hi Thomas, I wasn't able to reproduce your problem but I need more information to duplicate your environment precisely. First however, you might want to try upgrading your DB2 driver to the latest version (0.75). If you still have the problem please send me the following: DDL script to

Re: fat slow program DBI?

2001-07-03 Thread carlos lopez
Well, I'm using the software versions packed with Red Hat 7.1, I supose are near the lastest if not the lastest. The perl proces takes a lot of memory, not much processor is used, but the program answer very slow. Answering Julio's questions: * How big is each row? - well, each row is 5