Oracle Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesOracle Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today!
  #1  
Old March 1st, 2004, 12:11 AM
raseena raseena is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 11 raseena User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thumbs up DECODE - need an alias NAME..

hi,

please find the following query

select SL_NO,

decode( STAT_PERFORMING,0, (decode( STAT_SUBSTD, 0 ,(decode( STAT_DOUBTFUL, 0 , (decode( STAT_LOST, 0 ,

(decode( STAT_GOVT_PERF, 0 , (decode( STAT_GOVT_NON_PERF, 0 , (decode( STAT_SPL_MENTION, 0 , 0, STAT_SPL_MENTION)),

STAT_GOVT_NON_PERF)), STAT_GOVT_PERF)), STAT_LOST)), STAT_DOUBTFUL)), STAT_SUBSTD)), STAT_PERFORMING)DATA

from tfe_cred_classification where ACCOUNT_NO = 'sb001'

Here for the output returned by DECODE function, i've given an alias DATA, is there any way to display the selected column name as alias??

I mean if the first DECODE is getting worked in false part i'vll be getting the datas on STAT_PERFORMING column. In that case i want STAT_PERFORMING as the alias name.

Any kind of suggetions are higly appreciated.

Thanx.

Reply With Quote
  #2  
Old March 9th, 2004, 11:51 PM
galith_haham galith_haham is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 64 galith_haham User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 25 m 17 sec
Reputation Power: 5
hi,

if you are in 9i use case.

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesOracle Development > DECODE - need an alias NAME..


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway