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 a sql*loader control file?

1341


Can we call stored procedure in function?

1000


Which operator is used in query for pattern matching?

1133


Is sql injection illegal?

1081


Where the sql database files are stored?

1075


What is the purpose of the partition table?

1089


What is an intersect?

1156


Can we group by two columns in sql?

1046


How can I tell if sql is running?

1132


What is rollback?

1184


What are the constraints available in sql?

1085


Does truncate table reset auto increment?

1049


what is the difference between clustered and non clustered index in sql? : Sql dba

1188


What are the packages in pl sql?

1065


What are the types of dbms?

1021