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 Frnds this que is recently asked at IBM
there are two rows like aa6588fhfhf,gru282vbvv.
Question is howcan we retrive the first number from two
rows.
Can any one help

thanks in advance

Answer Posted / tdguy

I hope substr function can be used but somewhat lengthy.
But UDF would make task easy.

SEL SIX
FROM
(
SEL
CASE
WHEN SUBSTR(COLUMN,1,1) IN
('1','2','3','4','5','6','7','8','9','0')
THEN '1' ELSE '' END AS ONE,
CASE
WHEN SUBSTR(COLUMN,2,1) IN
('1','2','3','4','5','6','7','8','9','0')
THEN '2' ELSE '' END AS TWO,
CASE
WHEN SUBSTR(COLUMN,3,1) IN
('1','2','3','4','5','6','7','8','9','0')
THEN '3' ELSE '' END AS THREE,
CASE
WHEN SUBSTR(COLUMN,4,1) IN
('1','2','3','4','5','6','7','8','9','0')
THEN '4' ELSE '' END AS FOUR,
SUBSTR(TRIM(ONE||TWO||THREE||FOUR),1,1) AS FIVE,
SUBSTR(COLUMN,FIVE,1) AS SIX
FROM TABLE
) A

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the purpose of joins in teradata?

1262


tomorrow i have interview in infosys.can someone pour any suggestions or any interview questions. thank you

901


What do you mean by teradata intellicloud?

1077


What are the 5 phases in a multiload utility?

1090


What is the maximum number of dml can be coded in a multiload script?

1157


What do you mean by ttu in teradata?

1085


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

1001


What is the function of parser component in teradata?

1135


What is meant by Teradata Gateway?

1112


Explain the teradata primary index mechanics in detail with a diagram.

1039


Explain and compare pros and cons of snow flake schemas?

1089


If Fast Load Script fails and only the error tables are made available to you, then how will you restart?

1214


Explain BYNET.

1055


What is teradata?

1241


What does sleep function does in fast load?

1211