Bruce,

Thanks a ton.

-Dev


bsnyder wrote:
> 
> On 10/4/07, DEBANJAN <[EMAIL PROTECTED]> wrote:
>>
>> I am using a schema ADM containing a table MESSAGE. In the sql.properties
>> file i have a statement like-
>>
>> ROLLUPSELECT=SELECT DOCUMENTELEMENT\, TRUNC(RECEIVEDDATE)\,
>> RECEIVINGSERVER\, ORIGINATIONIP\, ORIGINATIONUSER\, COUNT(*) FROM
>> ADM.MESSAGE WHERE RECEIVEDDATE > TRUNC(SYSDATE)-1 AND RECEIVEDDATE <
>> TRUNC(SYSDATE) GROUP BY TRUNC(RECEIVEDDATE)\, DOCUMENTELEMENT\,
>> RECEIVINGSERVER\, ORIGINATIONIP\, ORIGINATIONUSER
>>
>> Then I have a statement like-
>>
>> ROLLUPINSERT=INSERT INTO ADM.ESB_ACTIVITY_ROLLUP (DOCUMENTELEMENT\,
>> EVENTDATE\, RECEIVINGSERVER\, ORIGINATIONIP\, ORIGINATIONUSER\,
>> MESSAGECOUNT) VALUES('{XPATH://COLUMN1}'\, TO_DATE ('{XPATH://COLUMN2}'\,
>> 'YYYY-MM-DD')\, '{XPATH://COLUMN3}'\, '{XPATH://COLUMN4}'\,
>> '{XPATH://COLUMN5}'\, {XPATH://COLUMN6})
>>
>> My queries are-
>>
>> 1. What are ROLLUPSELECT and ROLLUPINSERT? Are they created functions
>> which
>> are called by the java code?
> 
> It looks to me like it's just a SQL statement that is assigned to the
> property name ROLLUPSELECT and ROLLUPINSERT. I'm guessing that the
> properties file is read in by a Java class and the queries are each
> accessed via a call to the properties.getProperty(String) method.
> 
>> 2. Does date does this part of the SQL statement considers valid?
>> ".....WHERE RECEIVEDDATE > TRUNC(SYSDATE)-1 AND RECEIVEDDATE <
>> TRUNC(SYSDATE)......"
> 
> Sure, this WHERE clause is comparing some dates against the Oracle
> SYSDATE but it is using the Oracle TRUNC function to truncate the
> SYSDATE to some precision before the comparison.
> 
>> 3. Is this a XPath query? can someone let me know how this XPath query
>> works?
>> "...VALUES('{XPATH://COLUMN1}'\, TO_DATE ('{XPATH://COLUMN2}'\,
>> 'YYYY-MM-DD')\, ....."
> 
> I've not used the XPath functions in Oracle so I'll have to guess
> here, but it seems that the COLUMN1 and COLUMN2 variables are columns
> in the database that are stored as XML and I think the XPath function
> probably supports XPath query syntax.
> 
> Hope that helps ;-).
> 
> Bruce
> -- 
> perl -e 'print
> unpack("u30","D0G)[EMAIL PROTECTED]&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
> );'
> 
> Apache ActiveMQ - http://activemq.org/
> Apache ServiceMix - http://servicemix.org/
> Apache Geronimo - http://geronimo.apache.org/
> Castor - http://castor.org/
> 
> 

-- 
View this message in context: 
http://www.nabble.com/SQL-and-XPath-Query%28Urgent%29-tf4570958s12049.html#a13058078
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to