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 the built in functions of sql?
How can you get sql*loader to commit only at the end of the load file? : aql loader
What is bulk collect in pl sql?
What are local and global variables and their differences?
Can we create a trigger on view?
How does sql developer connect to oracle database?
Is it possible to sort a column using a column alias?
Which is faster union or join?
what are sequences
how do you know if your mysql server is alive? : Sql dba
how to use in conditions? : Sql dba
What is procedure and function?
What is primary key and foreign key with example?
What is meaning of <> in sql?
what is the difference between ereg_replace() and eregi_replace()? : Sql dba