Trying to get asp to display sql query

  • Hi,

    Not sure if anyone can help here. 

    Basically I have 2 tables one contains name and address the other is a reference table of the name and address table containing multiple dates and comments.  I've been asked to produce a report that would look a bit like this..

    id

    name

    add1

    add2

    add3

    add4

    postcode

    comment date comments

    comment date2 comments 2

    comment date3 comments 3

    etc etc etc.

     

    I am however having a massive mental block as to how to write this query.

     

    Of course why I mentioned asp in the subject of the post... when it's not important at this stage should be proof that I'm having one of those days.

  • It is relevant - because depends what you are using to render reports from the data, what data you need to return. You might be able return smaller parent and child recordsets to the web app which can build the report, or you might just return the joined recordset (with comments in a single column) and effectively the front end has the job of hiding the grouping columns from all but the first record of each group. It doesn't make much sense to do it as a query. If you really have to, it can be done...

    Tim Wilkinson

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

  • If you need all the formating on the server side, can you post a bit of DDL

    If you don't then join the tables and do the "verticalization" on the ASP side!

    Cheers,

      


    * Noel

  • Day of stupidity over...

    Thanks for the replies anyways.  Yep basically just did the join and then let asp format the results for me.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply