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 / ajit

select substr(src, 1,1 )||'uarter to '||to_char(to_date (substr(src, 2), 'rrrr'), 'yyyy') tgt
from <Table Name>

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Mention what problem one might face while writing log information to a data-base table in pl/sql?

668


What are different types of functions in sql?

504


What are the indexing methods?

566


What is the current version of sql?

528


how to rename an existing column in a table? : Sql dba

504






How do I add a primary key to a table?

535


What is the location of pre_defined_functions.

639


Are pl sql variables case sensitive?

590


Where the sql database files are stored?

477


What is sql deadlock?

558


how to select unique records from a table? : Sql dba

622


explain primary keys and auto increment fields in mysql : sql dba

514


Explain raise_application_error.

640


What is the difference between local variables and global variables?

600


How do you clear the screen in sql?

595