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...can any one help me regarding this que..

We have column in a table name it as C1 WHICH CONTAIN
ALPHANUMERIC AND NUMERIC VALUES.

C1
2A
2B
2V
2H
1
2
3
4
5

i want to retrive numeric values like 1,2,3,4,5

How we can get

Plz let me know.Thanks in advance

Answer Posted / tdguy

Assuming the column to be char(2), we can use the following
sql to retrieve the numeric values.

SEL C1 FROM
(SEL C1,
CASE
WHEN SUBSTR(C1,1,1) IN
('1','2','3','4','5','6','7','8','9','0')
THEN 'N'
WHEN SUBSTR(C1,1,1) IN (' ')
THEN 'S'
END AS ONE,
CASE
WHEN SUBSTR(C1,2,1) IN
('1','2','3','4','5','6','7','8','9','0')
THEN 'N'
WHEN SUBSTR(C1,2,1) IN (' ')
THEN 'S'
END AS TWO FROM STUD2
) A
WHERE ((A.ONE='N' AND A.TWO='N')
OR
(A.ONE='N' AND A.TWO='S')
OR
(A.ONE='S' AND A.TWO='N'))

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Different phases of multiload?

978


Why is the case expression used in teradata?

1064


Let us say there is a file that consists of 100 records out of which we need to skip the first and the last 20 records. What will the code snippet?

1174


Give a justifiable reason why Multi-load supports NUSI instead of USI.

1139


How many codd's rules are satisfied by teradata database?

1094


Highlight the differences between Primary Key and Primary Index.

1070


What are the components used in smp and massively parallel processing (mpp) machines?

1041


What is upsert statement in teradata?

1111


In general, how do you optimze any sql in teradata?

1023


Explain teradata utilities?

1017


What is spool space? Why do you get spool space errors? How do trouble-shoot them?

970


How do you define Teradata?

1021


Highlight the points of differences between the database and user in Teradata.

1092


how do you manage the production space. what are the proactive methods you can take ?

1923


How to select first n records in teradata?

1082