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
how to load data files into tables with 'mysqlimport'? : Sql dba
What is user defined functions?
how to use myisamchk to check or repair myisam tables? : Sql dba
how to show all tables with 'mysql'? : Sql dba
How exception handling is done in advance pl/sql?
- Types of triggers - View - Dcl - Procedures, packages, functions - Metasolve - Can use Dcl in triggers - package case study - Cursor and its types - triggers schedule - Wrap - Why we are using fetch and for in cursor. difference?
Write an sql query to select all records from the table?
Why schema is used in sql?
What are the types of join in sql?
What is a database? Explain
how to analyze tables with 'mysqlcheck'? : Sql dba
What is compute?
What is serial sql?
Can we use joins in subquery?
What is #table in sql?