0

I am using Tibco BW JDBC Query activity. My blow statment is running fine in SQL developer but not getting compiled as it gives an error "ORA-01008: not all variables bound"

select (cast(fech2 as timestamp) - cast(fech1 as timestamp) )total 
from
( 
select MIN(CASE WHEN message ='ABC'  THEN time_stamp END) fech1, 
MIN(CASE WHEN message ='efg'   THEN time_stamp END) fech2 
from log where Application = 'MNC' 
AND tid=?  
group by tid)

Please help? As I said, there is no change required in SQL developer to run this statement.

SOAMad
  • 325
  • 5
  • 22
  • `tid=?` need a variable to be bound. SQL Developer should throw `Missing IN or OUT parameter at index:: 1` for this. – Maheswaran Ravisankar Jun 24 '14 at 07:02
  • SQl developer is fine, I can replace ? with Value. It is Tibco BW throwing an error. – SOAMad Jun 24 '14 at 10:23
  • you need to set the value for the bind variables like one mentioned [here](https://docs.tibco.com/pub/businessevents_event_stream_processing/5.1.1_dec_2012/html/tib_be_event_stream_processing_query_developers_guide/wwhelp/wwhimpl/common/html/wwhelp.htm#href=query_developers_guide.4.22.htm&single=true) – Maheswaran Ravisankar Jun 24 '14 at 10:26

0 Answers0