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

how do you know if your mysql server is alive? : Sql dba

1027


What is composite data type in pl sql?

1035


How do I enable sql encryption?

969


Explain the difference between 'between' & 'and' operators in sql

948


How can we solve sql error: ora-00904: invalid identifier?

1168


What does the acronym acid stand for in database management?

985


Why use subqueries instead of joins?

1034


what are the properties and different types of sub-queries? : Sql dba

970


What is difference between sql and mysql?

1065


Mention what does the hierarchical profiler does?

1023


What is natural join in sql?

919


Does sql require a server?

945


What is a variable in sql?

953


what is a database transaction? : Sql dba

1108


what is a materialized view? : Sql dba

1000