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

Which is more efficient group by or distinct to find duplicates?

1090


How to load specific no.of records using bteq, or fastload,or multiload

1747


What is the basic syntax for teradata select statement?

1047


How would you load a very large file in teradata in general?

1034


What are different table types used in teradata?

1044


Why are oltp database designs not generally a good idea for a data warehouse?

1056


How is MLOAD Teradata Server restarted after execution?

1267


Highlight a few of the advantages that ETL tools have over Teradata.

1090


What are the different methods ot loading a dimension table? A fact table etc?

1036


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

1066


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

1036


What is node? How many nodes and amps used in your previous project?

1110


Hi, If anyone has TD 14 Basics dumps or study materials, please share. nirmaaal1991@gmail.com

2419


What are the different table types that are supported by teradata?

1003


What are the multiload utility limitations?

1058