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 type of indexing mechanism do we need to use for a typical data warehouse?

1099


What is the difference between fastload and multiload? Which one is faster?

1158


What do you mean by teradata sql assistant?

1012


How is MLOAD Teradata Server restarted after execution?

1193


How would you load a very large file in teradata in general? What utility would you use for it? Why?

1055


any one answer me how they can analyzing the project using data ware housing?

2425


Define views in teradata with general syntax.

1000


When tpump is used instead of multiload?

1061


What is dimensional modeling?

1028


What are the joins in teradata and how many types of joins are there in teradata?

976


What is partitioned primary index (ppi)?

1016


Explain teradata utilities. What is multiload, fast load, tpump?

961


What does sleep function does in fast load?

1081


if collect stats but it show low confidence why?

1637


Highlight the need for Performance Tuning.

1050