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 / aditya saxena @adi

select 'Quarter to '||to_char(to_date('01/01/'||substr(months,2),'dd/mm/rrrr'),'RRRR') AS Src_Tgt from (
select 'Q10' months from dual
union all
select 'Q90' from dual
union all
select 'Q80' from dual
union all
select 'Q74' from dual
)
;

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Do ddl statements need commit?

724


Mention what plvcmt and plvrb does in pl/sql?

834


How do you write a subquery?

694


What is not null in sql?

781


Which certification is best for sql?

725






What is a left inner join?

709


What is difference between left and right outer join?

722


What is a sql statement?

692


what is foreign key? : Sql dba

750


Explain clause in sql?

748


What is fmtonly in sql?

722


What is a full join?

707


What are the conditions an underlying table must satisfy before a cursor can be used by a positioned update or delete statement? : Transact sql

734


What is trigger point?

732


how to load data files into tables with 'mysqlimport'? : Sql dba

745