ResultSet rs=st.executeQuery(
"select j.vc_jo_no,
j.dt_jo_date,
p.vc_product_name
from mst_jobcard j,
mst_prod p
where j.vc_product_code=p.vc_product_code
and j.dt_jo_date=to_char("+tdate+","+"'"+dd-mm-yy+"'"+")
");
In my specified query it should display the records based on the date parameter that is being passed in the above query. the vc_jo_no,dt_jo_date are taken from mst_jobcard table and vc_product_name is taken from mst_prod table. i have joined the tables. please help me in how to use the to_char function for date. when i specify the format i.e dd-mm-yy in the to_char function it gives error. please help..