Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Use calculated value in the same select
Message
General information
Forum:
ASP.NET
Category:
Databases
Miscellaneous
Thread ID:
00901314
Message ID:
00901351
Views:
20
>I am trying to calculate some monthly totals and then use those totals in another column. Something like this:
>
>select sum(jan+feb+mar) as qtr1, sum(apr+may+jun) as qtr2, sum(qtr1+qtr2) as first6months from myTable
>
>Do I need to do this in a subquery or is there some way to use an alias to refer to the calculated qtr amounts?
>
>Kind Regards,
>
>Mat

Mat;

These requests may not be as easy as they sound.

1. Is it possible to define the requirement?
2. How many tables?
3. Are you filling a data grid or HTML table?

I thought I knew what you were attempting to do but I am not sure at this point. The part “use those totals in another column” is what throws me.

Tom
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform