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 / abhiraj
with data as (select 'Q10' as src from dual)
select
'Quarter to '||to_char((to_date('01/01/'||substr(Src,2), 'dd/mm/rrrr')),'rrrr') as "Target"
from data
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is the use of & in pl sql?
What is flag in sql?
Write a sql query to find the names of employees that begin with ‘a’?
What is sql select statement?
How to assign sql query results to pl sql variables?
Explain the difference between rename and alias?
Which column in the user.triggers data dictionary view shows that the trigger is a pl/sql trigger?
explain the difference between bool, tinyint and bit. : Sql dba
How is indexing done in search engines?
Can we use update in sql function?
What are sql ddl commands?
What is trigger types of trigger?
What is lexical units in pl sql?
How do I enable sql encryption?
Explain cursor types?