Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Hello Frndz,
I have a table named product as shown below:
product_id product_name
1 AAA
1 BBB
1 CCC
2 PPP
2 QQQ
2 RRR

Now my output should be:
product_id product_name_1 product_name_2 product_name_3
1 AAA BBB CCC
2 PPP QQQ RRR

Answer Posted / vaishnavi a

Thanks for ur response, i just gave a sample table with few
records, but in a real time scenario we have a table with
duplicates & there can be many products under a particular
prod_id.It is not that there should be only 3 products
under a prod_id , it could be even 50. wat could be an
optimised way of writing a query for this scenario??

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the purpose of upsert command?

1260


What is called partitioned primary index (ppi)?

1054


Explain amp in teradata?

1149


Can we have an unconnected lkp to lookup a db2 record against a teradata record? Doesnt seem to work. I could be wrong

1123


What is spool space? Why do you get spool space errors?

1079


Highlight the need for Performance Tuning.

1154


What happens in a conflict? How do you handle that?

1102


What is basic teradata query language?

1163


What is TPD?

1419


Syntax for case when statement?

1116


What do you mean by teradata intelliflex?

1167


What is meant by a Virtual Disk?

1205


How to write the query . eid enm doj dob i want to display the names who worked more than 25 years .

1824


Explain the term 'row' related to relational database management system?

998


What is the particular designated level at which a LOCK is liable to be applied in Teradata?

1084