Hi,

I am sure Castor supports the “functions” like TO_CHAR(), CONCAT() etc..

But I am not able to use it properly , can anybody suggest one example .

 

SQL:

 

  SELECT distinct(metric_name)

   FROM mpmweb.mpm_coding

WHERE market_name = 'SCORECARD'

     AND  CONCAT(TO_CHAR(qtr_year),TO_CHAR(quarter)) BETWEEN CONCAT(TO_CHAR(2004),TO_CHAR(3)) AND CONCAT(TO_CHAR(2005),TO_CHAR(1));

 

 

OQL:

 

aQuery = db.getOQLQuery(" SELECT metricList FROM com.cummins.mpm.domain.MeasurementWeightList metricList "

                                    + " WHERE metricList.marketName = $1 AND metricList.metricName != $4 AND concat(to_char(metricList.quarter),to_char(metricList.quarterYear)) between $2 AND $3 ");

            aQuery.bind(marketName.trim());

            aQuery.bind(fromQtrYear);

            aQuery.bind(toQtrYear);

            aQuery.bind(pbit);

 

 

Any help really appreciated !!!

 

rgrds

J Easwar

 

 

 




_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Information transmitted by this EMAIL is proprietary to iGATE Group of Companies and is intended for use only by the individual 
or entity to whom it is addressed and may contain information that is privileged, confidential, or exempt from disclosure under 
applicable law. If you are not the intended recipient of this EMAIL immediately notify the sender at iGATE or [EMAIL PROTECTED] 
and delete this EMAIL including any attachments
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Reply via email to