how ca i select the values of a column in one variable ?

  • hello friends (if i may call you friends even if i don't know you- i am also a begginer in this community) ...my name is Adrian and i need help ...in the folowing problem:

    i would like to select the values of a varchar colomn into one @variable without using the cursors...... if there is anybody who knows how i ask him(her) very nice to help me......

     

    regards from

    Adrian

  • Hi Adrian

    Hope this helps:::

    Use Pubs

    Declare @TitleList Varchar(8000)

    SELECT @TitleList = COALESCE(@TitleList + ', ', '') + au_fname FROM Authors

    SELECT @TitleList

    Thanks

    Brij Rauthan

    Brij

  • Thanks a lot brij_rauthan ...it works

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

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