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
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 ?
how can you see all indexes defined for a table? : Sql dba
What is procedure function?
Are dml statements autocommit?
what are the disadvantages of mysql? : Sql dba
What are keys in sql?
How to run pl/sql statements in sql*plus?
What is a column in a table?
Can you join views in sql?
What sql database should I use?
explain the difference between delete , truncate and drop commands? : Sql dba
what is meant by urlencode and urldocode? : Sql dba
How many postgresql users are there, worldwide?
Why stored procedure is faster than query?
What is a behavioral trigger?