I had a problem with PreparedStatement which uses ? after FROM clause.
Server reported org.postgresql.util.PSQLException: ERROR: syntax error
at or near "$1"
This is simplified example.
PreparedStatement pstmt;
try {
pstmt = conn.prepareStatement("SELECT * FROM ?");
pstmt.setString(1, "ps_nalog");
pstmt.executeQuery();
} catch (SQLException ex) {
ex.printStackTrace();
}
Can anybody tell me where is posibble to put ? in a SELECT statement !
best regards,
Djordje Nikolic
www.abanka.co.yu