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 / aditya saxena @adi
select 'Quarter to '||to_char(to_date('01/01/'||substr(months,2),'dd/mm/rrrr'),'RRRR') AS Src_Tgt from (
select 'Q10' months from dual
union all
select 'Q90' from dual
union all
select 'Q80' from dual
union all
select 'Q74' from dual
)
;
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Does sql between include endpoints?
What are the operators in sql?
What are the two types of exceptions in pl/sql?
Can we write dml inside a function in sql server?
How to take user input in pl sql?
How do we use distinct statement? What is its use?
What is trigger explain it?
How to select unique records from a table?
How do I run a script in sql developer?
How do you change a value in sql?
What is materialized view. What are different methods of refresh?
What are the two virtual tables available at the time of database trigger execution?
What operating systems are supported by oracle sql developer?
How to connect a sql*plus session to an oracle server?
how to get a list of columns in an existing table? : Sql dba