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
What are the different set operators available in sql?
What sql database should I use?
What has stored procedures in sql?
How can we find duplicate records in a table?
What is difference between stored procedures and application procedures?
What is the difference between union and union all command?
How to write html code in pl sql?
How do you use collections in procedure to return the resultset?
How do you delete duplicates in sql query using rowid?
Is pl sql useful?
How to select the Nth maximum salary from Table Emp in Oracle SQL Plus ?
How to return multiple rows from the stored procedure?
What is memory optimized?
Explain normalization and what are the advantages of it?
how to add a new column to an existing table in mysql? : Sql dba