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 / megha
select
'Quarter to '||to_char((to_date('01/01/'||substr(Src,2), 'dd/mm/rrrr')),'rrrr') as "Target"
from table
Is This Answer Correct ? | 9 Yes | 4 No |
Post New Answer View All Answers
What is sqlservr exe?
What are aggregate functions in sql?
What is set serveroutput on?
What is a primary key? Explain
Is it possible to Restore a Dropped Table using Rollback Command in Oracle SQL Plus ?
Show how functions and procedures are called in a pl/sql block.
how to enter binary numbers in sql statements? : Sql dba
what is oltp (online transaction processing)? : Sql dba
Can a key be both primary and foreign?
what is schema? : Sql dba
Explain the difference between cursor declared in procedures and cursors declared in the package specification?
How to get list of all tables from a database?
What is difference between table and view?
Is oracle and sql same?
Is left join and outer join same?