Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is the use of & in pl sql?

984


What is flag in sql?

980


Write a sql query to find the names of employees that begin with ‘a’?

950


What is sql select statement?

968


How to assign sql query results to pl sql variables?

988


Explain the difference between rename and alias?

963


Which column in the user.triggers data dictionary view shows that the trigger is a pl/sql trigger?

981


explain the difference between bool, tinyint and bit. : Sql dba

934


How is indexing done in search engines?

924


Can we use update in sql function?

1003


What are sql ddl commands?

1018


What is trigger types of trigger?

989


What is lexical units in pl sql?

1040


How do I enable sql encryption?

964


Explain cursor types?

951