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 / ronak
You have to use LPAD function,
Select lpad(address,20,'101')
from tableName;
NOTE: address is column name of address info, 20 is total
characters you want to display including 101 (since in this
case we don't know the characters of address),
Thank you
Ronak
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
In Teradata, how do we Generate Sequence?
What is real time and near real time data warehousing?
Write a program to show the parser component used in teradata?
What is teradata? Also, list out some of the primary characteristics of teradata.
Syntax for case when statement?
Why managing the data is important?
What is database exceptions in teradata?
How is MLOAD Teradata Server restarted after execution?
What is the purpose of joins in teradata?
What is called partitioned primary index (ppi) and discuss the advantages of using it in a query?
What are default access rights in teradata?
What are the uses of client software involved in teradata?
What is called partitioned primary index (ppi)?
Difference between multiload and tpump?
Explain the term 'tables' related to relational database management system?