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 concatenate two character strings? : Sql dba
How do you update sql?
Under what condition it is possible to have a page level lock and row lock at the same time for a query? : Transact sql
what is index? : Sql dba
What is difference between joins and union?
How do I upgrade sql?
what is the maximum length of a table name, database name, and fieldname in mysql? : Sql dba
How many rows can sqlite handle?
How many developers work on postgresql?
What are the properties of a transaction?
how to see the create table statement of an existing table? : Sql dba
How many joins can you have in sql?
Which join is like an inner join?
Show how functions and procedures are called in a pl/sql block.
How to execute a stored procedure?