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
Is truncate ddl or dml?
Why is pl sql used?
what are null values? : Sql dba
How do I partition a table in sql?
What is insert command in sql?
What is the current version of sql?
What if we write return in procedure?
discuss about myisam index statistics collection. : Sql dba
Write a unique difference between a function and a stored procedure.
What is the life of an sql statement?
What is consistency?
what is a trigger? : Sql dba
what is the difference between mysql_fetch_object and mysql_fetch_array? : Sql dba
What are the different type of joins in sql?
What are the operators in sql?