Hi All,
I need some help regading fetching query from a properties file.
Currently I have written the query below in my XSP file under the
<esq:query> tag
select
UPPER(CHN.CHANNEL_NAME) AS CHNL_NAME,
CHN.CHANNEL_NAME as CHANNEL_NAME,
CHN.CHANNEL_ID as CHANNEL_ID,
MAX(PCU.PEAK_CONC_USERS) as PEAK_CONC_USERS,
MAX(PCU.PEAK_CONC_TIME) as PEAK_CONC_TIME
from
PEAKCONCUSERSREPORT PCU,
CHANNELS CHN
where
PCU.PRODUCT_ID = <esql:parameter><xsp-request:get-parameter
name="productType"/></esql:parameter>
and PCU.DATE_ID =
to_date(<esql:parameter><xsp:expr>enddt</xsp:expr></esql:parameter>,'MON DD,
YYYY')
and CHN.CHANNEL_ID = PCU.CHANNEL_ID
group by CHN.CHANNEL_ID, CHANNEL_NAME
Order By <xsp:expr>column</xsp:expr> <xsp:expr>order</xsp:expr>
Now I need to fetch this query from a property file instead of writing the
query in the esql tag.
My question is : How do we write such query when it has dynamic values, like
the Product id depends on the PrductType parameter and the date_id depends
on the date selected at runtime, and the order by clause also depends on
some logic.
Is it possible to do this in cocoon.
I was thinking of using the java.util.Properties to load the properties file
and then get the query string.
Thanks in advance,
Panna
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]