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

What is the syntax for case when statement?

1126


What can be achieved by using the teradata rdbms?

1030


What is real time and near real time data warehousing?

1115


How can bottlenecks be identified?

1009


What are the enhanced features in teradata v2r5 and v2r6?

1127


What type of indexing mechanism do we need to use for a typical data warehouse?

1158


What is the use of virtual processor connectivity in teradata?

996


What are the different table types that are supported by teradata?

998


Explain teradata vs. Redshift?

1009


Explain parsing engine in teradata?

1084


Highlight the differences between Primary Key and Primary Index.

1082


Explain vproc in teradata?

991


Explain amp in teradata?

1071


Can any one explain me the difference between BTEQ and MLOAD,TUMP. All canbe used for same purpose but still differnt methods. why ?

3615


What is the function of parser component in teradata?

1075