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

Syntax for case when statement?

1115


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

1120


Comment whether bottleneck is an error or not.

1219


Difference between inner join and outer join?

1082


Why does varchar occupy 2 extra bytes?

1270


Why teradata is used?

1050


What is teradata? Also, list out some of the primary characteristics of teradata.

1128


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

1182


What happens in a conflict? How do you handle that?

1101


What are the joins in teradata?

1070


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

1135


Describe primary index in teradata. And what are the available primary index types?

1041


What are the enhanced features in teradata v2r5 and v2r6?

1184


What are teradata utilities?

1155


any one answer me how they can analyzing the project using data ware housing?

2520