• sun_kuang (2/13/2009)


    Hi Guys,

    I created a query where it contains ID, Email, Class and a dynamic column which changes or grow depending on the parameter I select.

    Your query selects data using @Session and will only have one session but you use 'IN' in the query?

    If the purpose is to select many sessions and pivot them then the easiest solution would be to output flat data

    e.g SELECT ID, Email, Class, Session, Quantity FROM TEST WHERE Session IN ('A','B','C')

    and use a matrix in reporting services which will pivot the data and allow you to use session as column header.

    Far away is close at hand in the images of elsewhere.
    Anon.