Home » SQL & PL/SQL » SQL & PL/SQL » build formula
build formula [message #231884] Wed, 18 April 2007 13:45 Go to next message
roba
Messages: 11
Registered: December 2006
Junior Member
i want to make a formula that will sum the budorigoblg** columns and then subtract that total from budallot. This needs to be a new colum labeled Obligations V/S Allotment. For the budorigoblg i wnat it to prompt for which columns to use (ie. budorigoblg 10-3 meaning months oct, nov, dec)

help would be greatly appriciated i am stuck.
Re: build formula [message #231889 is a reply to message #231884] Wed, 18 April 2007 13:52 Go to previous message
BlackSwan
Messages: 25050
Registered: January 2009
Location: SoCal
Senior Member
>help would be greatly appriciated i am stuck.
A redesign of the underlying table would (IMO, greatly) simplify this task.
You are challeneged because having a column per month is a bad, bad, bad "architecture".
Too bad for you that the designer did not implement 3rd Normal Form tables.
The 1st thing one should do when they find themselves is a hole, is to STOP DIGGING!
You can code around this poor design, but it will take a lot of effort & will likley require "dynamic SQL" which does not scale.
Previous Topic: 9i to 10g
Next Topic: Calling a function
Goto Forum:
  


Current Time: Sat Dec 10 05:02:34 CST 2016

Total time taken to generate the page: 0.13260 seconds