vivasc 0 Newbie Poster

Hi.

I am building an intranet directory to list all the websites in our organization. We have built the directory in JSP working with Oracle. Idea is to have by default the directory ordered alphabetically and grouped by the first letter of the site name, as an example:

A

Asia ...
America...
Asia Pacific...

B

Belgium...

Do anyone an idea about how i can nest the resultset based in the first letter of the site name?.

Basic look i have to display the results is:

<% while ((rs_dir_hasData)&&(Repeat1__numRows-- != 0)) { %>
  <% if (!rs_dir_isEmpty ) { %>
  <tr>
    <td class="na"><a href="<%=(((rs_dir_data = rs_dir.getObject("ST_URL"))==null || rs_dir.wasNull())?"":rs_dir_data)%>" target="_blank"><%=(((rs_dir_data = rs_dir.getObject("ST_NAME"))==null || rs_dir.wasNull())?"":rs_dir_data)%></a></td>
    <td class="na"><%=(((rs_dir_data = rs_dir.getObject("ST_REGION"))==null || rs_dir.wasNull())?"":rs_dir_data)%></td>
    <td class="na"><%=(((rs_dir_data = rs_dir.getObject("ST_BUS"))==null || rs_dir.wasNull())?"":rs_dir_data)%></td>
    <td class="na"><%=(((rs_dir_data = rs_dir.getObject("ST_OW"))==null || rs_dir.wasNull())?"":rs_dir_data)%></td>
  </tr>
  <tr>
    <td colspan="4" class="det"><%=(((rs_dir_data = rs_dir.getObject("ST_DES"))==null || rs_dir.wasNull())?"":rs_dir_data)%></td>
  </tr>
  <% } /* end !rs_dir_isEmpty */ %>

  <%
  Repeat1__index++;
  rs_dir_hasData = rs_dir.next();
}

thanks in advance for your help

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.