need help in writing join select query

  • Hi,

       I am trying to develop a report. Basically we have two tables named A and B.

    In Table A we have columns

    DelivTypeId

    EstDate

    CompDate

    In Table B we have columns

    DelivTypeId

    DelivDesc

    I have written a join select statement to get the DelivDesc, StartDate, Enddate

    so the result would be like

    DelivDesc           StartDate        EndDate

    Tiering1              8/31/2004       9/20/2004

    Tiering2              8/31/2004       9/20/2004

    Tiering3              8/31/2004       9/20/2004

    Tiering4              8/31/2004       9/20/2004

    I need my datagrid look like this

    Tiering1              Tiering 2              Tiering 3            Tiering 4

    Completed           Completed          Completed         Completed

    I need to put the column values as column labels and I need to check whether the completed date is less than the current date. if so i need to place "Completed" in that column.

    Can you please let me know how to do this? Do I need to change my Select Statement or can i access multiple rows inside my datagrid?

    Thanks,

    Sridhar!!

  • Hi,

      I looked at the article. In that aricle they know the column names before like Q1, Q2,etc but in my case i have to get the column names from another table. Can you point me to any other links?

    Thanks,

    Sridhar!!

     

     

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

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