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 do you know if your mysql server is alive? : Sql dba
What is composite data type in pl sql?
How do I enable sql encryption?
Explain the difference between 'between' & 'and' operators in sql
How can we solve sql error: ora-00904: invalid identifier?
What does the acronym acid stand for in database management?
Why use subqueries instead of joins?
what are the properties and different types of sub-queries? : Sql dba
What is difference between sql and mysql?
Mention what does the hierarchical profiler does?
What is natural join in sql?
Does sql require a server?
What is a variable in sql?
what is a database transaction? : Sql dba
what is a materialized view? : Sql dba