Home Forums SQL Server 7,2000 T-SQL eliminating duplicates from stored procedure joins RE: eliminating duplicates from stored procedure joins

  • You need some sort of hierarchical display for the data: you could try outputting as XML, and using an XSL stylesheet to display the data (or for intranet on IE, use an XML data island and javascript) - or most simply, just have one page for the Case IDs, and when the caseID is clicked, open a new page (and a new query) showing the relevant files for viewing.

    How are you displaying the data at present? If you are using ADO scroll through the recordset and build an HTML table dynamically, you could have a variable to check when CaseID changes, and replace the value of CaseID with "&nbsp" for all rows except the first of each CaseID. You will still have the same number of rows, but it will be easier for users to read and easier to find the CaseID they are looking for if the table is like:

    CASEID.......FILENAME

    ....23.......File1

    .............File2

    .............File4

    ....30.......File3

    .............File7

    .............File8

    .............File9

    ....48......File12

    Hope these rather sketchy remarks are of some use.

    Tim

    Tim Wilkinson

    "If it doesn't work in practice, you're using the wrong theory"
    - Immanuel Kant