Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DBD::Oracle::db prepare failed: ORA-00933: SQL command not properly en 3

Status
Not open for further replies.

netman4u

Technical User
Joined
Mar 16, 2005
Messages
176
Location
US
I found another thread much like mine

thread219-451673

but I am not sure how to "break up my statement". This SQL query was given to me to run in my script. Any ideas how to fix this?

Code:
  my $sth = $dbh->prepare( q{select T1.SVALUE, T2.SVALUE, T3.SVALUE from twtpropvalues T1, twtpropvalues T2, twtpropvalues T3 where T1.PROPID=(select ID from twtproperties where WID='00000000000000000000000000000001')T2.PROPID=(select ID from twtproperties where WID='72B1577C795AB24888F4462B18D8F42D') and T3.PROPID=(select ID from twtproperties where WID='069003638BAFDA11BCB000166F0D3E5D') and T1.INSID=T2.INSID and T2.INSID=T3.INSID and T1.INSID=(select ID from twtinstances where zonesetid='350100')
}
  ) or die "Can't prepare statement: $DBI::errstr";

Giving output:

Code:
DBD::Oracle::db prepare failed: ORA-00933: SQL command not properly ended (DBD ERROR: error possibly near <*> indicator at char 188 in 'select T1.SVALUE, T2.SVALUE, T3.SVALUE from twtpropvalues T1, twtpropvalues T2, twtpropvalues T3 where T1.PROPID=(select ID from twtproperties where WID='00000000000000000000000000000001')<*>T2.PROPID=(select ID from twtproperties where WID='72B1577C795AB24888F4462B18D8F42D') and T3.PROPID=(select ID from twtproperties where WID='069003638BAFDA11BCB000166F0D3E5D') and T1.INSID=T2.INSID and T2.INSID=T3.INSID and T1.INSID=(select ID from twtinstances where zonesetid='350100')
') [for Statement "select T1.SVALUE, T2.SVALUE, T3.SVALUE from twtpropvalues T1, twtpropvalues T2, twtpropvalues T3 where T1.PROPID=(select ID from twtproperties where WID='00000000000000000000000000000001')T2.PROPID=(select ID from twtproperties where WID='72B1577C795AB24888F4462B18D8F42D') and T3.PROPID=(select ID from twtproperties where WID='069003638BAFDA11BCB000166F0D3E5D') and T1.INSID=T2.INSID and T2.INSID=T3.INSID and T1.INSID=(select ID from twtinstances where zonesetid='350100')
"] at ./bpBellSouthCoyote_Beta_10_11.pl line 188.
Can't prepare statement: ORA-00933: SQL command not properly ended (DBD ERROR: error possibly near <*> indicator at char 188 in 'select T1.SVALUE, T2.SVALUE, T3.SVALUE from twtpropvalues T1, twtpropvalues T2, twtpropvalues T3 where T1.PROPID=(select ID from twtproperties where WID='00000000000000000000000000000001')<*>T2.PROPID=(select ID from twtproperties where WID='72B1577C795AB24888F4462B18D8F42D') and T3.PROPID=(select ID from twtproperties where WID='069003638BAFDA11BCB000166F0D3E5D') and T1.INSID=T2.INSID and T2.INSID=T3.INSID and T1.INSID=(select ID from twtinstances where zonesetid='350100')
') at ./bpBellSouthCoyote_Beta_10_11.pl line 188.

Thanks,

Nick



If at first you don't succeed, don't try skydiving.
 
select ID from twtproperties where WID='00000000000000000000000000000001')AND T2.PROPID=(select ID from twtproperties where WID='72B1577C795AB24888F4462B18D8F42D') and T3.PROPID=(select ID from twtproperties where WID='069003638BAFDA11BCB000166F0D3E5D') and T1.INSID=T2.INSID and T2.INSID=T3.INSID and T1.INSID=(select ID from twtinstances where zonesetid='350100'


just a guess...
 
Good guess PD! It worked.

Thanks.

I notice the participation on this forum has gone down recently. Anyone know the reason?



If at first you don't succeed, don't try skydiving.
 
I would say that there are sooo many questions coming through that people are answering the "fun" ones...

...but again... just another guess ;)
 
good spot PD!

I notice the participation on this forum has gone down recently. Anyone know the reason?
Most of us float between many forums JavaScript , MS Access VBA, XHTML/CSS etc.. so don't take it personally ;-)

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you.
 
would say that there are sooo many questions coming through that people are answering the "fun" ones...

...but again... just another guess ;)

The reason I mention it is because I am one of the "MVPs" of this forum and I only have one or two stars and it just seems to me that answers to my questions used to come faster and from more sources.

If at first you don't succeed, don't try skydiving.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top