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 Least Cost Plan?

704


What are the components provided on node?

672


What is dimensional modeling?

687


What is the purpose of using case expression in teradata?

657


How many tables can you join in v2r5?

702






In BTEQ, how are the session-mode parameters being set?

790


Highlight the need for Performance Tuning.

678


Difference between multiload and tpump?

716


What is called partitioned primary index (ppi)?

640


What is difference between user and database in teradata?

722


Explain fastload in teradata?

709


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

730


Can we collect statistics on table level?

695


Can you connect multiload from ab initio?

732


how many modules are there in telecome domain?how to explain the architecture?

1642