Home » Developer & Programmer » Precompilers, OCI & OCCI » USE OF LIKE IN OCCI Statement String
USE OF LIKE IN OCCI Statement String [message #179598] Wed, 28 June 2006 03:03 Go to next message
rgajwani
Messages: 1
Registered: June 2006
Junior Member
How to use like in statement string
I tried
WHERE USAGE_SOURCE_CODE = :1 AND REPROCESS_TYPE= :2 \
AND STATUS=:3\
And Created_Date <= to_date(:4, 'YYYYMMDDHH24MISS') \
AND BATCH_NUMBER LIKE " ;
mStmtString.append( "'%" );
mStmtString.append( ":5'" );
mStmtString.append( "order by Batch_Number");

26082::20060628114553===> CReprocessBatchControlEntityManager: get
MultipleEntities : :Error Code: 32109Error Message: ORA-32109: invalid column or paramet
er position
:Terminating the process....
Re: USE OF LIKE IN OCCI Statement String [message #189520 is a reply to message #179598] Fri, 25 August 2006 00:21 Go to previous message
kmohan
Messages: 28
Registered: July 2005
Junior Member
Try using
... BATCH_NUMBER LIKE :5 ORDER BY BATCH_NUMBER ... for the sql and
bind the values including the %.

eg.:
stmt->setString(5,"%<your pattern>");
Previous Topic: Memory leak problem while passing Object to stored procedure from C++ code
Next Topic: Stack Trace Error - OCCI
Goto Forum:
  


Current Time: Tue Dec 03 13:20:59 CST 2024