how to write case statement or loop statement in simple sql query for same product with multiple sub products??
eg If I have product computer then sub products are like laptop,desktop,harddisk,ram etc
table is like productno | productsubno | productdesc|
1 2 laptop
1 2 desktop
1 2 harddisk like this...
and I want output like
product productsubcode desc1 desc2 desc3 etc...
1 2 laptop desktop hardisk
Please help in simple sql query...