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 are the built in functions of sql?

1027


How can you get sql*loader to commit only at the end of the load file? : aql loader

1009


What is bulk collect in pl sql?

1087


What are local and global variables and their differences?

1089


Can we create a trigger on view?

892


How does sql developer connect to oracle database?

998


Is it possible to sort a column using a column alias?

1042


Which is faster union or join?

967


what are sequences

1741


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

1078


how to use in conditions? : Sql dba

1010


What is procedure and function?

976


What is primary key and foreign key with example?

929


What is meaning of <> in sql?

1066


what is the difference between ereg_replace() and eregi_replace()? : Sql dba

1147