בעיה בPreparedStatement בJAVA
אם אני כותב בשאילתא select * from table where my_date in (to_date('20040101','YYYYMMDD')) אז אין בעיה והכל עובד. אבל אם השאלה היא select * from table where my_date in ? ואז אני עושה ps.setString(1,"(to_date('20040101','YYYYMMDD'))") אני מקבל SQLException 01858 a non numeric symbol where a numeric symbol expected. מה הבעיה?
אם אני כותב בשאילתא select * from table where my_date in (to_date('20040101','YYYYMMDD')) אז אין בעיה והכל עובד. אבל אם השאלה היא select * from table where my_date in ? ואז אני עושה ps.setString(1,"(to_date('20040101','YYYYMMDD'))") אני מקבל SQLException 01858 a non numeric symbol where a numeric symbol expected. מה הבעיה?