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 are tables in sql?
What is a sql profiler?
What is the use of function in sql?
What is cost in sql execution plan?
What does over partition by mean in sql?
Does sql between include endpoints?
What is the difference between stored procedure and view?
what does the t-sql command ident_current does? : Transact sql
Enlist some predefined exceptions?
What is difference between pls_integer and integer?
Does sql profiler affect performance?
what is isam? : Sql dba
how to write date and time literals? : Sql dba
Is the primary key an index?
How to run sql statements with oracle sql developer?