Query Help

  • Hi

    I have problem and i need to do a select whit custom selectable columns, like sending the columns that i whant to show as parameters.

    select @Column1, @Column2, @Column3

    from Table

    how do i do this? Theres a better way to do this?

    how do i control if user only whant 1 colum for the select?

    thank you any help to solve this.

  • You are going to have use dynamic sql to accomplish this particular task. I'd suggest doing some research first looking at BOL (Books Online). After that, if you still have questions we'll be here to help answer them.

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

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