• Hi,

    Please find my code...

    SELECT pivottable.[Parameter 1], pivottable.[Parameter 2], pivottable.[Parameter 3]

    from

    (

    SELECT Param_ID, Parameter

    from lu_Parameter

    ) as st

    pivot

    (

    max(Param_ID)

    FOR Parameter in ([Parameter 1], [Parameter 2], [Parameter 3])

    ) as pivottable

    I have managed to get the paramter name in the title and parameter id as row. How to join this pivot table with my tbl_param_data table and get data in the format of the one shown in the attached png image?

    Also in this section FOR Parameter in ([Parameter 1], [Parameter 2], [Parameter 3]) i'm passing the values inside in as Parameter 1, Parameter 2, Parameter 3. So i'm predefining the values here. But, these values will not be the same for always. So it has to be dynamic. How to set this as dynamic?

    Please help me to complete this...