0 Replies Latest reply on Aug 17, 2005 6:54 AM by catherine lo

    retrieve more than one columns using declared-sql

    catherine lo Newbie

      I am using JBoss 4.0.1SP1 and mysql

      I have this JBoss declared-sql :
      SELECT c.Status, Month(c.firstUsed), COUNT(c.serialNumber) FROM Card c WHERE c.status = 4 GROUP BY Month(c.firstUsed)

      here is my jbosscmp-jdbc.xml:

      < select >
      < alias ><![CDATA[c]]>< /alias >
      <additional-columns><![CDATA[, Month(c.firstUsed), COUNT(c.serialNumber)]]></additional-columns>
      < /select >
      < where ><![CDATA[ c.status = 4 GROUP BY Month(c.firstUsed)]]>< /where >

      Is there anyway I can read these Month(c.firstUsed), COUNT(c.serialNumber) from the collection returned by this query?