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


Please Help Members By Posting Answers For Below Questions

Table A Table B 1 1 2 1 3 1. Union & union all --> A Union B , A Union all B 2. Minus , Intersect --> A minus B , B Minus A , A Intersect B 3. Joins A join B , A Left Join B A Right Join B , A full Join B 4. %Type - Uses & Benifit 5. Truncate & Delete 6. Pragma Autonomus Transaction 7. how to Perform DDL from function or procedure 8. Can we have DML inside Function 9. Rank & Dense Rank diffrence 10. Water Mark in Oracle 11. Index , Can we have index in all column of table if no then why ?

743


how can you see all indexes defined for a table? : Sql dba

712


What is procedure function?

708


Are dml statements autocommit?

751


what are the disadvantages of mysql? : Sql dba

763






What are keys in sql?

725


How to run pl/sql statements in sql*plus?

758


What is a column in a table?

770


Can you join views in sql?

718


What sql database should I use?

786


explain the difference between delete , truncate and drop commands? : Sql dba

745


what is meant by urlencode and urldocode? : Sql dba

770


How many postgresql users are there, worldwide?

779


Why stored procedure is faster than query?

681


What is a behavioral trigger?

695