converting rows to columns

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
chitravallivenkat
Participant
Posts: 106
Joined: Thu Jun 08, 2006 8:51 am

converting rows to columns

Post by chitravallivenkat »

Can any one suggest me how to convert rows into column.
i have implemented as max( case.....). but there is problem in executing so plz help me out in this
sachin1
Participant
Posts: 325
Joined: Wed May 30, 2007 7:42 am
Location: india

Re: converting rows to columns

Post by sachin1 »

please elaborate on what you want and what is your input..........
chitravallivenkat
Participant
Posts: 106
Joined: Thu Jun 08, 2006 8:51 am

Re: converting rows to columns

Post by chitravallivenkat »

Thanks,

The below is the query :-
max(case when tda.addrs_seq_nbr=1 then tda.orgnl_addrs_ln_txt else null end) orgnl_addrs_ln_1,

will the pivot stage help me out in this..
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

That query doesn't really tell us what you are trying to accomplish. Please try to spell out in words what the problem is that you are trying to solve. Forget the "max case" query, just talk to us. Examples of your source data and what it would need to look like in the target are always helpful.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply