DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: query not giving proper result

  1. #1
    Join Date
    Feb 2006
    Posts
    86

    query not giving proper result

    i want to concatenate values of three column in one row

    for example my data is:
    Binoy> select * from fpfm_nominies where emp_no='1283L';

    EMP_NO NOMINEE
    ------- -------------------------
    1283L Lal Mathi
    1283L POONAM KUMARI
    1283L SUMAN KUMARI .
    it generates three different records with same emp_no but different
    nominee. now i want to show names of all nominee in one row through select query only.something like this:

    emp_no name
    -------- -------------------------------------------
    1283L Lal Mathi,POONAM KUMARI,SUMAN KUMARI


    can anyone help me out.

  2. #2
    Join Date
    Jul 2002
    Location
    Lake Worth, FL
    Posts
    1,492

    Cool


    This question has been asked thousands of times, do some research!

    Hint: 'pivot table', 'crosstab', 'rows to columns',...


    "The person who says it cannot be done should not interrupt the person doing it." --Chinese Proverb

Posting Permissions

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


Click Here to Expand Forum to Full Width