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 spool space? Why do you get spool space errors? How do trouble-shoot them?

930


What are the available join types in teradata?

1013


My table got locked during mload due to a failed job. What do I do to perform other operations on it?

1042


Highlight the limitations of TPUMP Utility.

1050


how many modules are there in telecome domain?how to explain the architecture?

1964


What is the opening step in basic teradata query script?

982


What are the joins in teradata?

922


How to Extract data from multiple legacy systems?

1043


What do you mean by caching in teradata?

996


How to find duplicates in a table?

1136


What are the different functions included in the server software?

979


Explain teradata utilities?

984


Explain the meaning of Amp?

1035


Difference between inner join and outer join?

953


Can you fastexport a field, which is primary key by putting equality on that key?

1118