Or use AddDynamicStrCriterion.
===
-----Original Message-----
From: Javier Cordero [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 14, 2000 12:23 PM
To: John Lapham; [EMAIL PROTECTED]
Subject: Re: [ND] using an oracle function in a dataobject query
Try to make a function like this (without a DataObject):
String query = "SELECT emplid from tablename WHERE " +
"lower(emailId) = "+emailID.stringValue();
CSpDBResult resu = CSpDataObject.executeImmediate ("DataSourceName", query);
if (resu.getNumOfRows() > 0) {
CSpDBResultTable valor = resu.getResultTable();
return (new CSpDouble(valor.getRowData(0,0).doubleValue()));
} else {
return (new CSpDouble(0));
}
This way is simpler and it execute faster for me.
John Lapham wrote:
How can I change the dataobject sql query below to use the "lower()"
function in oracle
getEmailId.addDynamicCriterion("emailid",
CSpCriteriaSQLObject.EQUAL_TO_STR_OPERATOR,
new CSpString(emailID));
getEmailId.execute();
I want the query to look like this...
SELECT emplid from tablename
WHERE lower(emailId) = 'john.doe'
--
John Lapham
Global One
------------------------------------------------------------------------
_________________________________________________________________________
To unsubscribe from this mailing list please send an email to:
[EMAIL PROTECTED]
Please remember to use the same email address you subscribed with.
For help in using, subscribing, and unsubscribing to the discussion
forums, please go to: http://www.netdynamics.com/support/visitdevfor.html
<http://www.netdynamics.com/support/visitdevfor.html>
For dire need help, email: [EMAIL PROTECTED]
_________________________________________________________________________
To unsubscribe from this mailing list please send an email to:
[EMAIL PROTECTED]
Please remember to use the same email address you subscribed with.
For help in using, subscribing, and unsubscribing to the discussion
forums, please go to: http://www.netdynamics.com/support/visitdevfor.html
For dire need help, email: [EMAIL PROTECTED]