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
How can we implement rollback or commit statement in a trigger?
What are the types of functions in sql?
How do you sort in sql?
What is the maximum number of columns in sql table?
what is the bond code in materialized view?
what is an extent ? : Sql dba
What is a delimiter in sas?
Is left join faster than inner join?
What is sql select statement?
What is the difference between clustered and non-clustered indexes?
What is exit statement?
What are the advantages of pl sql over sql?
What is the left table in sql?
Why is pl sql used?
What is forward declaration in pl sql?