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...

Hi Friends

I have a sql question, We have the source data as below.

101 address1, address2, address3

and the output shoulb like below

101 address1
101 address2
101 address3

Required a SQL query for this output.

Please let me know if you have any sql query for this.

Thanks in advance.

Hari M

Answer Posted / ksks

Make use of UNPIVOT to split one record into many rows:
select id,address from T1 unpivot (address for address_type in (address1,address2,address3))

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

In the Primary Index, what is the score of AMPs that are actively involved?

994


If a Node is busy what are the steps you can take to avoid ?

2344


Explain the teradata primary index mechanics in detail with a diagram.

909


what are the uses of fact table and dimension table in banking project?

4483


List out all forms of LOCKS that are available in Teradata.

913


What do you mean by tpt in teradata?

959


What are the different softwares used with their functions in teradata?

963


What are the scenarios in which full table scans occurs?

938


What is the difference between union and union all in teradata?

1042


How do you define Teradata?

980


Why teradata is used?

936


What interface is used to connect to windows based applications?

1031


How to run a query in teradata?

1004


What is the opening step in basic teradata query script?

973


What are the functions of a Parser?

1022