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

What is meant by a dispatcher?

771


Explain the new features of teradata?

788


What are the functions involved in shared information architecture?

812


Highlight the limitations of TPUMP Utility.

786


Highlight a few of the advantages that ETL tools have over Teradata.

860


Which is faster fastload or multiload?

805


Syntax for case when statement?

808


What is upsert statement in teradata?

816


In a table can we use primary key in one column and in another column both unique and not null constrains.if yes how?

827


How many codd's rules are satisfied by teradata database?

866


Describe primary index in teradata?

758


How can bottlenecks be identified?

763


What are the commands to make a new table, change a table and remove a table in teradata?

850


How many sessions of MAX is PE capable of handling at a particular time?

801


List the logical and conditional operators that are used with teradata along with their meanings?

745