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


Please Help Members By Posting Answers For Below Questions

Is truncate ddl or dml?

545


Why is pl sql used?

530


what are null values? : Sql dba

547


How do I partition a table in sql?

543


What is insert command in sql?

529






What is the current version of sql?

540


What if we write return in procedure?

788


discuss about myisam index statistics collection. : Sql dba

531


Write a unique difference between a function and a stored procedure.

534


What is the life of an sql statement?

527


What is consistency?

717


what is a trigger? : Sql dba

580


what is the difference between mysql_fetch_object and mysql_fetch_array? : Sql dba

555


What are the different type of joins in sql?

544


What are the operators in sql?

532