|
Posted by lukster on 09/26/65 11:42
Hello There,
I'm trying to create a view that has calculations dependent on
calculations, where the problem resides is that each time I make a
calculation I must create an intermediate view so I can reference a
previous calculation.
for example lets say I have my_table that has columns a & b. now I want
a view that has a & b, c = a + b, and d = c + 1.
this is grossly simplified, the calculations I actually use are fairly
complex and copying / pasting them is out of the question.
so what I have is my_view_a which makes column c, and my my_view_final
which makes column d (however, in my real application I have 5 of these
views, a/b/c/d/e/)
is there anyway I can consolidate all these views into one? I was
thinking of using a stored procedure with temp tables or something
along those lines.
I just which I can use the aliases that I create for c in d in one
step.
any insight would be greatly appreciated.
Navigation:
[Reply to this message]
|