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 / abhiraj
with data as (select 'Q10' as src from dual)
select
'Quarter to '||to_char((to_date('01/01/'||substr(Src,2), 'dd/mm/rrrr')),'rrrr') as "Target"
from data
Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
what is acid property in database? : Sql dba
What is a table?
how to run 'mysql' commands from a batch file? : Sql dba
Why do we go for stored procedures?
Explain the insert into statements in sql?
What are different methods to trace the pl/sql code?
What is a rank in sql?
What is sql and how does it work?
How to read xml file in oracle pl sql?
What are keys in sql?
Which one is better subquery or joins?
What happens when a trigger is associated to a view?
Does truncate need commit?
What is string join?
What is pivot in sql?