Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Hi send me the Teradata dumps to my id rajeshanantha@yahoo.co.in Thanks Rajesh. A

3315


What is smp and mpp platforms?

900


If I wanted to run a TPump job only once per day - basically working on a file that is produced once per day - how would you set up the parameters for that sort of job ?

2418


What is the use of virtual processor connectivity in teradata?

940


Define views in teradata with syntax.

1021


What is the purpose of indexes?

1010


What are the main components of teradata system?

1066


What are the various indexes in teradata? How to use them? Why are they preferred?

996


What type of indexing mechanism do we need to use for a typical data warehouse?

1081


How is MLOAD Teradata Server restarted after execution?

1166


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

1066


Differentiate database data and data warehouse data?

1053


what are the uses of fact table and dimension table in banking project?

4491


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

929


Difference between multiload and tpump?

1039