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

Highlight a few of the important components of Teradata?

1025


why use references rather than pointers in the public api, particularly for arguments which are modified?

1004


What are the functions of a teradata dba?

1070


What are the frequently used data types in teradata?

1076


What are the available primary index types?

1208


Explain and compare pros and cons of start schemas?

1061


What is the command in bteq to check for session settings ?

1178


During the Display time, how is the sequence generated by Teradata?

1049


What is smp and mpp platforms?

968


What do you mean by ttu in teradata?

1031


Can we have two time dimensions in a schema(either star or snow flake)? For ex if we want joining date of employee and if we want today's sales with time whether can we have two time dimensions for accommodating above tasks?

2113


What do you mean by tpt in teradata?

1019


What is called partitioned primary index (ppi) and discuss the advantages of using it in a query?

1016


What is multi insert?

1045


How do you set the session mode parameters in bteq?

1102