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


Please Help Members By Posting Answers For Below Questions

Explain some differences between mpp and smp?

582


What are the different table types supported by teradata?

523


Explain and compare pros and cons of snow flake schemas?

601


In Teradata, how do we Generate Sequence?

597


What happens when a node suffers a downfall?

663






What is a node in teradata? Explain

593


What does sleep function does in fast load?

612


Highlight the differences between Primary Key and Primary Index.

606


what is sysdba and sysdbc ? which has high priority ?

3357


What is the maximum number of dml can be coded in a multiload script?

613


Explain the most common data types used in teradata?

584


What do you mean by teradata intelliflex?

620


What are the string manipulation operators and functions associated with teradata?

627


Explain the term 'columns' related to relational database management system?

544


How to find duplicates in a table?

605