Thursday 3 July 2014

How to pivot a multiple rows into single row

How to pivot a multiple rows into single row
Source Data:
DEPTNO
EMP NAME
10
CLARK
10
KING
10
MILLER
20
JONES
20
FORD
20
ADAMS
20
SMITH
20
SCOTT
30
WARD
30
TURNER
30
ALLEN
30
JAMES
30
BLAKE
30
MARTIN

Target Data:

DEPTNO
EMP NAME
10
CLARK|KING|MILLER
20
JONES|FORD|ADAMS|SMITH|SCOTT
30
WARD|TURNER|ALLEN|JAMES|BLAKE|MARTIN






6 comments:

  1. How can we achieve this through sql statement?

    ReplyDelete
  2. Hi may i know what is the use of (LAST(in_ENAME)) IN Aggregator

    ReplyDelete
  3. it select last record from the data set

    ReplyDelete
  4. You should see how my friend Wesley Virgin's biography begins with this SHOCKING AND CONTROVERSIAL VIDEO.

    Wesley was in the military-and shortly after leaving-he revealed hidden, "MIND CONTROL" secrets that the CIA and others used to get whatever they want.

    As it turns out, these are the exact same secrets many famous people (notably those who "come out of nowhere") and top business people used to become rich and famous.

    You probably know how you use less than 10% of your brain.

    Mostly, that's because the majority of your brainpower is UNTAPPED.

    Perhaps that conversation has even occurred INSIDE your very own head... as it did in my good friend Wesley Virgin's head 7 years ago, while driving a non-registered, beat-up trash bucket of a car with a suspended driver's license and on his bank card.

    "I'm very frustrated with going through life check to check! Why can't I become successful?"

    You've been a part of those those thoughts, ain't it right?

    Your own success story is going to start. You need to start believing in YOURSELF.

    WATCH WESLEY SPEAK NOW

    ReplyDelete
  5. hI,wILL YOU PLEASE GIVE YOUR CONTACT DETAILS

    ReplyDelete