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 a sql*loader control file?
Can we call stored procedure in function?
Which operator is used in query for pattern matching?
Is sql injection illegal?
Where the sql database files are stored?
What is the purpose of the partition table?
What is an intersect?
Can we group by two columns in sql?
How can I tell if sql is running?
What is rollback?
What are the constraints available in sql?
Does truncate table reset auto increment?
what is the difference between clustered and non clustered index in sql? : Sql dba
What are the packages in pl sql?
What are the types of dbms?