Not really sure what you're exactly trying to do butyou can always just concatenate the string using yourarguments.i.e.....resultSet = stmnt.executeQuery("Select * from " +tableName + " where log_field1 = '" + value + "'");....