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

what is a composite primary key ? : Sql dba

782


Why truncate is faster than delete?

791


what is sub-query? : Transact sql

839


What is embedded sql in db2?

708


Explain the insert into statements in sql?

729






How will you distinguish a global variable with a local variable in pl/sql?

844


How do I send sql query results to excel?

767


How do I add a database to sql?

777


How does pl sql work?

706


Why is a primary key important?

727


What is ttitle and btitle?

768


What is parallel hint?

935


What is difference between stored procedures and application procedures?

764


What has stored procedures in sql and how we can use it?

764


What is the difference between delete and truncate statement in sql?

681