Re: How to perform JOINs with DBI
From: Tim Bunce (Tim.Bunce_at_pobox.com)
Date: 07/24/04
- Next message: Tim Bunce: "Re: Oddity using placeholders w/ Oracle"
- Previous message: Steven Lembark: "Oddity using placeholders w/ Oracle"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 24 Jul 2004 08:06:13 +0100 To: "Moreno, Javier" <JavierMoreno@eaton.com>
On Fri, Jul 23, 2004 at 12:19:24PM -0500, Moreno, Javier wrote:
> Hi all,
>
> I am having issues trying to do the following:
>
> SELECT I.idIssue, I.Description, I.idEntry, I.idStatus, E.Description, E.CreateDate, E.idPriority,
> E.idSeverity, E.idUser, E.DueDate FROM MASTER_Issue I, MASTER_Entry E WHERE I.idIssue = ? AND I.idEntry
> = E.idEntry
>
> The query runs fine but I get no information back from it. What could be wrong? I ran the same query
> (replacing the placeholder with the value) on the database and it ran fine and returned information.
If I.idIssue is a CHAR type field then you'll need to tell DBD::Oracle
to bind the placeholder as a CHAR. Otherwise the value is bound as a varchar
and oracle doesn't use the blank-padded-comparison-semantics that you need.
use DBI qw(:sql_types);
...
$sth->bind_param(1, $foo, SQL_CHAR);
Tim.
- Next message: Tim Bunce: "Re: Oddity using placeholders w/ Oracle"
- Previous message: Steven Lembark: "Oddity using placeholders w/ Oracle"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|