dyanmic adding column??

  • Hello friends!!

    I need help.....

    I have view which gives me records for student result like

    create view result

    as

    select ...some column name , maths,english

    from

    ( select some column name,

    case subject_name when maths then maths + 10 maths,

    case subject_name when english then english + 10 english from tableX

    ) P

    Like that actually subject_name i m getting from different tableX...but in future that records may increase as subject increase..now the data i m getting is static data from that perticular tableX..but i want flexible data like select subject_name from that perticular tableX...

    so is that any query that will give me...as records will increase in tableX that will appear in first select list


    Regards,

    Papillon

  • Papillon,

    see this post:

    http://qa.sqlservercentral.com/forums/shwmessage.aspx?forumid=5&messageid=249572

    Creating a new table base on existing table data

    Posted 1/10/2006 6:44:00 AM

    I think it does close to what you need.

    Regards,Yelena Varsha

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

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