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


Please Help Members By Posting Answers For Below Questions

what are string data types? : Sql dba

505


How do I truncate a sql log file?

525


Explain what is a view?

590


What is difference between pls_integer and integer?

514


What is sql injection owasp?

541






What is trigger in sql?

574


What are the three forms of normalization?

520


Is pl sql useful?

535


What are inner outer left and right joins in sql?

508


What is a string data type in sql?

512


What makes a good primary key?

515


Can you sum a count in sql?

549


What does data normalization mean?

525


How can we store rows in PL/SQL using array?

657


What is dynamic query?

533