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
Does truncate remove indexes?
What is sql engine in oracle?
How run sql*plus commands that are stored in a local file?
How to get list of all tables from a database?
which command using query analyzer will give you the version of sql server and operating system? : Sql dba
How do I add a database to sql?
What are the datatypes available in pl/sql ?
Is primary key a clustered index?
Why is stored procedure faster than query?
How to sort the rows in sql.
Why do we use joins?
What is cte?
How do you write an index?
How do sql triggers work?
How do you delete duplicates in sql query using rowid?