How to group this?

  • the data looks like this:

    PartNo                 Location

    P1                       Loc1

    P1                       Loc2

    P1                        Loc3

    P2                        Loc2

    P2                        Loc4

    I need to list all the locations for each part:

    P1                        Loc1,Loc2,Loc3

    P2                        Loc2,Loc4

    Is there a way that can be done without using cursor and temp table?

    thanks a lot.

  • http://sqljunkies.com/WebLog/amachanic/archive/2004/11/10/5065.aspx?Pending=true

    --
    Frank Kalis
    Microsoft SQL Server MVP
    Webmaster: http://www.insidesql.org/blogs
    My blog: http://www.insidesql.org/blogs/frankkalis/[/url]

  • Thanks a lot Frank.

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

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