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
What is meant by a Highest Cost Plan?
How to find duplicates in a table?
What are the scenarios in which full table scans occurs?
Name the five phases that come under MultiLoad Utility.
Write a program to show the parser component used in teradata?
Explain fastload in teradata?
What are the joins in teradata?
how can we analyze the locks ?
If Fast Load Script fails and only the error tables are made available to you, then how will you restart?
Explain vproc in teradata?
How do you create tables? Exact syntax, and create profiles, users in teradata?
How do you set the session mode parameters in bteq?
What is spool space? Why do you get spool space errors?
Explain parsing engine in teradata?
What is the difference between global temporary tables and volatile temporary tables?