Hello,
When I�m using MySql database, this query is ok�:
oql = db.getOQLQuery("SELECT assure FROM
fr.cnam.scapin.metier.donnees.assures.Assure assure where
month(assure.dateNaissance) like $1")
But for Oracle, the month keyword is not recognized.
So I tried this :
oql = db.getOQLQuery(
"CALL SQL SELECT
NUMNATIDENT,CLENUMNATIDENT,REGIMEPRINCIPAL,CIVILITE,NOMPATRONYMIQUE,PREN
OM,NOMMARITAL,IDENTIFIANTASSURE,DATE1EREIMMAT,DATEDECES,DATEDECESCONJOIN
T,DATEMARIAGE,DATENAISSANCE,TELEPHONE,NUMRUE,ADRESSE,COMPADRESSE,CODEPOS
TAL,VILLE,DEPARTEMENT,PAYS FROM ASSURE "
+ "WHERE EXTRAC(MONTH FROM TO_DATE(assure.dateNaissance,'DD-MON-RR'))
like $1 AS fr.cnam.scapin.metier.donnees.assures.Assure");
But I've got an exception on this line :
results = oql.execute();
15 [main] ERROR exception.ApplicationException - nestedException =
java.lang.NullPointerException
java.lang.NullPointerException
at
org.exolab.castor.jdo.engine.SQLEngine.createCall(SQLEngine.java:430)
at
org.exolab.castor.jdo.engine.OQLQueryImpl.execute(OQLQueryImpl.java:513)
at
org.exolab.castor.jdo.engine.OQLQueryImpl.execute(OQLQueryImpl.java:488)
at
org.exolab.castor.jdo.engine.OQLQueryImpl.execute(OQLQueryImpl.java:453)
at
fr.cnam.scapin.metier.donnees.TestJdo.lectureAssure(TestJdo.java:142)
I don't understand how to use pass-through SQL ...
And I don't know where to find Oracle jdbc keywords to be used in
standard OQL ( like substr )...
An idea?
Sylvie.
___________________
CREDI RA
Sylvie Palluel
[EMAIL PROTECTED]
___________________
**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.
www.mimesweeper.com
**********************************************************************
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev