Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

decode?

Status
Not open for further replies.

Stevennn

Programmer
Apr 4, 2007
52
US
I'm trying to pull a column name Month_Year the value is Jan-2005. How can i make my extract look likt this: "JAN"?


thank-you
 
If "Month_Year" is a character column (e.g. VARCHAR2), then you can extract an uppercase month abbreviation with:
Code:
SELECT upper(substr(Month_Year,1,3))...
Let us know if this resolves your need.

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
[I provide low-cost, remote Database Administration services: www.dasages.com]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top