Write a query to genarate target column.Please answer me.
Advance Thanks.

Src Tgt

Q10 Quarter to 2010
Q90 Quarter to 1990
Q80 Quarter to 1980
Q74 Quarter to 1974

Answer Posted / ajit

select substr(src, 1,1 )||'uarter to '||to_char(to_date (substr(src, 2), 'rrrr'), 'yyyy') tgt
from <Table Name>

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is sql sequential or random?

541


What is a dirty read sql?

487


What are the different types of constraints?

566


What is composite data type in pl sql?

559


What is sqlservr exe?

480






What is sql server and ase?

540


How many unique keys can a table have?

557


Is primary key always clustered index?

537


What is auto increment feature in sql?

621


Which is better join or subquery?

608


How do we use distinct statement? What is its use?

554


What are pl/sql cursors?

567


how can we repair a mysql table? : Sql dba

540


What are the usages of sql?

564


What is sql*loader?

575