It was limitation/requirement to have single table. Thats why need to use self joins... BTW this was my first mysql program and I am not aware of issues with self joins...?? I can create temporary tables in that case... Pls suggest other methods also as I would ne using this kind of query a lot in my work...
-- ThanX n Regards YogS On 7/13/08, John <[EMAIL PROTECTED]> wrote: > > > > On 7/10/08 5:52 PM, "yogi_raj_143" <[EMAIL PROTECTED]<mail2yogs%40gmail.com>> > wrote: > > > Hello, > > I need some help in creating mySQL query, > > > > I have a database in format > > > > Year Brand Rel > > 1990 ABC 5 > > 1990 PQR 4 > > 2000 ABC 3 > > 2000 PQR 2 > > > > > > I want to display this data in format > > Year Brand_ABC_Rel Brand_PQR_Rel, ie > > 1990 5 4 > > 2000 3 2 > > > > Pls let me know the mYSQL for the same... > > > Hmmm...from my point of view, without knowing more about your database, I > would have designed the tables and relatoinships differently....you can do > internal relationships I know, but they aren't my strong point... > > > [Non-text portions of this message have been removed]