}
private String getSeriesDrilldownQuery(Series series, String xFilterString) {
StringBuilder sql;
sql = new StringBuilder();
ExtendedListBox valueSelector = series.getDBColumnSelector();
sql.append("SELECT test_idx, ");
sql.append(valueSelector.getSelectedValue());
sql.append(" FROM tko_perf_view_2 WHERE ");
String seriesFilter = series.getFilterString();
if (!xFilterString.equals("") || !seriesFilter.equals("")) {
sql.append(xFilterString.replace("%", "%%"));
if (!xFilterString.equals("") && !seriesFilter.equals("")) {
sql.append(" AND ");
}
sql.append(seriesFilter.replace("%", "%%"));
sql.append(" AND ");
}
sql.append(xAxis.getSelectedValue());
sql.append(" = %s ORDER BY ");
sql.append(valueSelector.getSelectedValue());
return sql.toString();
}