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 / pavan

sel (case
when position('1' in name)>0 then substring(name from position('1' in name) for 1)
when position('2' in name)>0 then substring(name from position('2' in name) for 1)
when position('3' in name)>0 then substring(name from position('3' in name) for 1)
when position('4' in name)>0 then substring(name from position('4' in name) for 1)
when position('5' in name)>0 then substring(name from position('5' in name) for 1)
when position('6' in name)>0 then substring(name from position('6' in name) for 1)
when position('7' in name)>0 then substring(name from position('7' in name) for 1)
when position('8' in name)>0 then substring(name from position('8' in name) for 1)
when position('9' in name)>0 then substring(name from position('9' in name) for 1)
when position('0' in name)>0 then substring(name from position('0' in name) for 1)
else substring(name from 0 for 1)
end),name from ttemp.t2sel (case
when position('1' in name)>0 then substring(name from position('1' in name) for 1)
when position('2' in name)>0 then substring(name from position('2' in name) for 1)
when position('3' in name)>0 then substring(name from position('3' in name) for 1)
when position('4' in name)>0 then substring(name from position('4' in name) for 1)
when position('5' in name)>0 then substring(name from position('5' in name) for 1)
when position('6' in name)>0 then substring(name from position('6' in name) for 1)
when position('7' in name)>0 then substring(name from position('7' in name) for 1)
when position('8' in name)>0 then substring(name from position('8' in name) for 1)
when position('9' in name)>0 then substring(name from position('9' in name) for 1)
when position('0' in name)>0 then substring(name from position('0' in name) for 1)
else substring(name from 0 for 1)
end),name from ttemp.t2;

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the uses of bynets in multi-node systems?

584


Explain teradata utilities?

563


What's the difference between timestamp (0) and timestamp (6)?

632


Explain fastload in teradata?

596


What are the joins in teradata?

565






Hi Friends, Please send me Teradata Materials for certifications Thanks in advance !!

1691


What are the different functions included in the server software?

599


How many types of joins are there in teradata?

540


What are the different softwares used with their functions in teradata?

571


Explain teradata vs. Redshift?

553


What are the different table types supported by teradata?

529


What are some commonly used bteq scripts?

563


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

1473


What interface is used to connect to windows based applications?

580


Did you write stored procedures in teradata?

611