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

For dire need help, email: [EMAIL PROTECTED]

begin:vcard 
n:Cordero;Javier Alejandro
tel;cell:(0351) 15-5083670
tel;fax:+54-11 4807-4999
tel;home:+54-11 4777-2108
tel;work:+54-3487 443380  /  +54-11 4807-4999
x-mozilla-html:TRUE
url:www.winit.com.ar
org:WINIT s.a.
adr:;;Pacheco de Melo 2945 - PB "2";Bs. As.;Bs. A.;5411;Argentina
version:2.1
email;internet:[EMAIL PROTECTED]
title:Consultor
fn:Ing. Javier Alejandro Cordero
end:vcard

_________________________________________________________________________
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]

Reply via email to