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.