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

select
'Quarter to '||to_char((to_date('01/01/'||substr(Src,2), 'dd/mm/rrrr')),'rrrr') as "Target"
from table

Is This Answer Correct ?    9 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is foreign key mandatory?

714


What is sql server and ase?

711


what are the nonstandard string types? : Sql dba

803


What are primary key and foreign key and how they work?

743


What does sql stand for?

702






What are the two characteristics of a primary key?

667


Why we use cross join?

703


Can a foreign key have a different name?

695


How to connect a sql*plus session to an oracle server?

819


How can we implement rollback or commit statement in a trigger?

786


Which nosql database is best?

679


what is index? : Sql dba

747


what are the security recommendations while using mysql? : Sql dba

769


what is the difference between truncate and drop statements? : Sql dba

744


What is spool?

790