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 meant by a Highest Cost Plan?

1063


How to find duplicates in a table?

1218


What are the scenarios in which full table scans occurs?

1010


Name the five phases that come under MultiLoad Utility.

988


Write a program to show the parser component used in teradata?

977


Explain fastload in teradata?

1109


What are the joins in teradata?

1015


how can we analyze the locks ?

2132


If Fast Load Script fails and only the error tables are made available to you, then how will you restart?

1153


Explain vproc in teradata?

1003


How do you create tables? Exact syntax, and create profiles, users in teradata?

1036


How do you set the session mode parameters in bteq?

1106


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

1021


Explain parsing engine in teradata?

1093


What is the difference between global temporary tables and volatile temporary tables?

1182