Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2017
    Posts
    2

    Angry Unanswered: Convert Rows to a SINGLE Column

    Hi,

    I have Table1: (ignore the dots)

    Employee State
    Jim......... MD
    Jim......... TX
    Jim......... AZ
    Tom........ MD
    Tom........ NJ

    I need a Sybase query that returns TWO columns:

    Employee Regions
    Jim......... MD, TX, AZ
    Tom........ MD, NJ

    Is this possible?

    Thanks so much!

  2. #2
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    602
    Provided Answers: 31
    Use the query wizard and make a CROSSTAB query.
    It will ask what to use as rows, as columns,etc.

  3. #3
    Join Date
    Jun 2017
    Posts
    2

    Arrow the States need to be in a single column

    A crosstab query will merely put each state as its own column. I need a SINGLE column that COMBINES all the states into ONE column. Separated by a comma:

    Employee Regions
    Jim......... MD, TX, AZ
    Tom........ MD, NJ

    Note the column REGIONS. It is a SINGLE column storing the state names.

    Thanks,

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •