Re: merging two rows

> for example i have two rows in this manner> > id name account type code> > 1 sunil checking x a1> 2 sunil savings y a2> > can i get in this way by merging two rows> > id name account type code account1 type1 code 1> > 1 sunil checking x a1 savings y a2> > i tried to do self join also o think it does not work since there is> one primary key called id> and there is no chance of group by also> > thank you> sunil>

Is the NAME field unique? If so, then a self join as follows would work:

In your case, a GROUP BY is not the correct clause for the job..based on
what you have provided so far.

If the NAME field is not unique, then how do you determine which rows
get "merged" with other rows?

HTH,
Brian

--
===================================================================
Brian Peasland
dba_at_nospam.peasland.net
http://www.peasland.net
Remove the "nospam." from the email address to email me.
"I can give it to you cheap, quick, and good.
Now pick two out of the three" - Unknown