Hi !

I don't know whether it will work or not, but try putting some spaces on the
both sides of "=" sign in e.rsuid=?

Regards,
Amit Saxena

On Tue, Jun 24, 2008 at 2:35 AM, Karen Hoofnagle <[EMAIL PROTECTED]>
wrote:

> Hi, I'm running OSX 10.5.3 and I've installed the Oracle instant client.
> sqlPlus works just fine and I would have considered by DBD::Oracle install
> to be ok, as well.
> I can touch my databases and run simple sql statements on them using DBI.
>
> However, some code I have in production running happily on another system
>  will not run on the box described above.
>
> Also, the perl I know this runs under is v5.8.8 built for
> sun4-solaris-thread-multi
> The one it's failing on is perl, v5.8.8 built for
> darwin-thread-multi-2level
>
> Here's the code:
> It fails to compile a prepared statement choking on the very first value
> variable to be passed in no matter what order the variables fall in.
>
>
>  $get_crsline_data = $db_handle->prepare("SELECT rsuid, icomsan, t.hubidlc
> hub, poleno, ".
>               "atten, building rsu_address, ".
>               "c.street || ' ' ||c.apt cust_address, c.city cust_city, ".
>               "state, len, rcntelno, lname, fname, instdate, ".
>               "rsu_no, positions, t.hubidlc||'-RSU-' ||rsu_no
> ||'-'||positions ID, mrf_group, t.discodate ".
>            "FROM ".
>            " [EMAIL PROTECTED] c ".
>            " inner join [EMAIL PROTECTED] t on t.cust_id = c.cust_id ".
>            " inner join [EMAIL PROTECTED] p on t.tp_id = p.tp_id  ".
>            " inner join [EMAIL PROTECTED] i on p.idlcpos_id =i.idlcpos_id ".
>            " inner join [EMAIL PROTECTED] e on i.equip_id = e.equip_id ".
>            " inner join [EMAIL PROTECTED] b on  e.build_id = b.build_id  ".
>            " left outer join [EMAIL PROTECTED] m on  e.ms_id = m.ms_id ".
>            "WHERE ".
>             " e.rsuid=? and ".
>             " e.rsu_no =? and ".
>             " t.hubidlc =? and ".
>             " p.positions = ?"
>        );
>
> Here's the error I get:
>
> "DBD::Oracle::db prepare failed: ORA-00911: invalid character  DBD ERROR:
> error possibly near <*> indicator at char 651 in 'SELECT rsuid, icomsan,
> t.hubidlc hub, poleno, atten, building rsu_address, c.street || ' ' ||c.apt
> cust_address, c.city cust_city, state, len, rcntelno, lname, fname,
> instdate, rsu_no, positions, t.hubidlc||'-RSU-' ||rsu_no ||'-'||positions
> ID, mrf_group, t.discodate FROM  [EMAIL PROTECTED] c  inner join
> [EMAIL PROTECTED] t on t.cust_id = c.cust_id  inner join [EMAIL PROTECTED] on 
> t.tp_id = p.tp_id   inner join [EMAIL PROTECTED] on p.idlcpos_id 
> =i.idlcpos_id  inner join [EMAIL PROTECTED] on i.equip_id = e.equip_id  inner 
> join [EMAIL PROTECTED] on  e.build_id = b.build_id   left outer join [EMAIL 
> PROTECTED] on  e.ms_id = m.ms_id WHERE  e.rsuid=<*>? and  e.rsu_no =? and  
> t.hubidlc
> =? and  p.positions = ?') [for Statement "SELECT rsuid, icomsan, t.hubidlc
> hub, poleno, atten, building rsu_address, c.street || ' ' ||c.apt
> cust_address, c.city cust_city, state, len, rcntelno, lname, fname,
> instdate, rsu_no, positions, t.hubidlc||'-RSU-' ||rsu_no ||'-'||positions
> ID, mrf_group, t.discodate FROM  [EMAIL PROTECTED] c  inner join
> [EMAIL PROTECTED] t on t.cust_id = c.cust_id  inner join [EMAIL PROTECTED] on 
> t.tp_id = p.tp_id   inner join [EMAIL PROTECTED] on p.idlcpos_id 
> =i.idlcpos_id  inner join [EMAIL PROTECTED] on i.equip_id = e.equip_id  inner 
> join [EMAIL PROTECTED] on  e.build_id = b.build_id   left outer join [EMAIL 
> PROTECTED] on  e.ms_id = m.ms_id WHERE  e.rsuid=? and  e.rsu_no =? and  
> t.hubidlc =?
> and  p.positions = ?"] at TeadInterface.pm line 120.
> DBD::Oracle::db prepare failed: ORA-00911: invalid character (DBD ERROR:
> error possibly near <*> indicator at char 651 in 'SELECT rsuid, icomsan,
> t.hubidlc hub, poleno, atten, building rsu_address, c.street || ' ' ||c.apt
> cust_address, c.city cust_city, state, len, rcntelno, lname, fname,
> instdate, rsu_no, positions, t.hubidlc||'-RSU-' ||rsu_no ||'-'||positions
> ID, mrf_group, t.discodate FROM  [EMAIL PROTECTED] c  inner join
> [EMAIL PROTECTED] t on t.cust_id = c.cust_id  inner join [EMAIL PROTECTED] on 
> t.tp_id = p.tp_id   inner join [EMAIL PROTECTED] on p.idlcpos_id 
> =i.idlcpos_id  inner join [EMAIL PROTECTED] on i.equip_id = e.equip_id  inner 
> join [EMAIL PROTECTED] on  e.build_id = b.build_id   left outer join [EMAIL 
> PROTECTED] on  e.ms_id = m.ms_id WHERE  e.rsuid=<*>? and  e.rsu_no =? and  
> t.hubidlc
> =? and  p.positions = ?') [for Statement "SELECT rsuid, icomsan, t.hubidlc
> hub, poleno, atten, building rsu_address, c.street || ' ' ||c.apt
> cust_address, c.city cust_city, state, len, rcntelno, lname, fname,
> instdate, rsu_no, positions, t.hubidlc||'-RSU-' ||rsu_no ||'-'||positions
> ID, mrf_group, t.discodate FROM  [EMAIL PROTECTED] c  inner join
> [EMAIL PROTECTED] t on t.cust_id = c.cust_id  inner join [EMAIL PROTECTED] on 
> t.tp_id = p.tp_id   inner join [EMAIL PROTECTED] on p.idlcpos_id 
> =i.idlcpos_id  inner join [EMAIL PROTECTED] on i.equip_id = e.equip_id  inner 
> join [EMAIL PROTECTED] on  e.build_id = b.build_id   left outer join [EMAIL 
> PROTECTED] on  e.ms_id = m.ms_id WHERE  e.rsuid=? and  e.rsu_no =? and  
> t.hubidlc =?
> and  p.positions = ?"] at TeadInterface.pm line 120.
>
> FWIW, I ran DBI_TRACE=5 on this and the log is attached.
>
> Thoughts very much appreciated.
> Karen
>
>
>
>
>
>
>
>
>

Reply via email to