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
Do ddl statements need commit?
Mention what plvcmt and plvrb does in pl/sql?
How do you write a subquery?
What is not null in sql?
Which certification is best for sql?
What is a left inner join?
What is difference between left and right outer join?
What is a sql statement?
what is foreign key? : Sql dba
Explain clause in sql?
What is fmtonly in sql?
What is a full join?
What are the conditions an underlying table must satisfy before a cursor can be used by a positioned update or delete statement? : Transact sql
What is trigger point?
how to load data files into tables with 'mysqlimport'? : Sql dba