Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: case statement - strange results

Re: case statement - strange results

From: stephen O'D <stephen.odonnell_at_gmail.com>
Date: 24 Aug 2005 01:42:32 -0700
Message-ID: <1124872952.110765.274570@f14g2000cwb.googlegroups.com>


>1. Columns named attr_2 and attr_11.
>2. Using VARCHAR2 to hold time.
>
>
>My recommendation is that before you kludge this together you:
>
>
>1. Take a basic class in normalization and database design.
>2. Learn how to use a column of DATE data type.

In response to Daniel -

I am fully aware of normalization and using a date to store times. I did state that this is a vendor application that am an attempting to product reports on, and have no control over the database structure. What it comes down to here, is that the application needs to store many different event types (event_type_id's) in this table (the real table has infact 36 attr_ columns including some other data). Each of these event types can have 1 - 36 attributes, with different types and names.  The events are then rated depending on the attributes supplied - for my event 55, its cost depends on the duration, time of date and various other factors. For event 56, it depends on the value in attr_2 only etc. I ask how you would construct such a configurable system without using a kludge?

That aside, the point here is whether Oracle is working correctly or not, not how much I know about database design.

Barbara - Of course! I was using the case and decode differently. It was like I was doing:-

decode (event_type_id, 55, sum(), 56 sum(), sum(1) ).

I can assure you I won't make that mistake again.

Thanks for your help! Received on Wed Aug 24 2005 - 03:42:32 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US