Teradata access using JDBC connection - issues - help needed

Database

Teradata access using JDBC connection - issues - help needed

Hi
I am writing a query from Bi publisher and teradata is the datasource. the connection is established using jdbc. if you look at the query there is a parameter (workDaysPassed) which is used in the select clause. when i run the query i get error.
the error is
[NCR] [Teradata DBMS] [TeraJDBC 03.03.00.06] Syntax error: parameter token '?' is not allowed in select list.
Experts I would need your help on this.
if the run the query in Teradata Sql Assistant it runs fine.
appreciate your help on this.

the query is
select
bi.nalm_sales_rpt_lvl_curr.terr_id,
bi.nalm_sales_rpt_lvl_curr.terr_empl_name,
bi.sub_acct_curr.sub_acct_id,
bi.sub_acct_curr.sub_acct_name,
bi.sub_acct_curr.mast_bgrp_id,
bi.sub_acct_addr.city_name,
SUM (bi.actv_chrg_prelim.net_rev_amt),
?workDaysPassed
from
bi.actv_lkup,
bi.nalm_sales_rpt_lvl_curr,
bi.actv_chrg_prelim,
bi.use_chrg_prelim,
bi.sub_acct_addr,
bi.sub_acct_curr
where
(
(
bi.sub_acct_addr.addr_type_cd = 'M'
)
and
(
bi.use_chrg_prelim.use_dt >= cast('10/05/2005' as date format 'mm/dd/yyyy')
)
and
(
bi.nalm_sales_rpt_lvl_curr.terr_id = '101060'
)
and
(
bi.use_chrg_prelim.clndr_yr_month = '200908' )
and
(
bi.actv_chrg_prelim.bill_ind = 'Y'
)
and
(
bi.actv_lkup.bill_ind = 'Y'
)
)
and
bi.sub_acct_addr.sub_acct_id = bi.sub_acct_curr.sub_acct_id
and
bi.sub_acct_curr.sub_acct_id = bi.use_chrg_prelim.sub_acct_id
and
bi.use_chrg_prelim.use_dt = bi.actv_chrg_prelim.use_dt
and
bi.use_chrg_prelim.use_key = bi.actv_chrg_prelim.use_key
and
bi.use_chrg_prelim.dfs_key = bi.actv_chrg_prelim.dfs_key
and
bi.use_chrg_prelim.sub_acct_id = bi.actv_chrg_prelim.sub_acct_id
and
bi.actv_chrg_prelim.actv_cd = bi.actv_lkup.actv_cd
and
bi.sub_acct_curr.sub_acct_id = bi.nalm_sales_rpt_lvl_curr.sub_acct_id
group by
bi.nalm_sales_rpt_lvl_curr.terr_id,
bi.nalm_sales_rpt_lvl_curr.terr_empl_name,
bi.sub_acct_curr.sub_acct_id,
bi.sub_acct_curr.sub_acct_name,
bi.sub_acct_curr.mast_bgrp_id,
bi.sub_acct_addr.city_name