Thursday, February 16, 2012

Adding Computed Columns Together

I have two computed columns (subtotal1, subtotal2) and I
want to add them together to get a Total. I want to show
it on a data access page that links to a SQL DB. This is
like a Purchase Order Database. Is this possible? What is
the easiest way to do this?
Thanks,
Nate SUse a view or query. Totals and subtotals don't belong in a table.
CREATE VIEW Something_with_totals (col1, col2, total)
AS
SELECT col1, col2, col1+col2
FROM Something
--
David Portas
--
Please reply only to the newsgroup
--

No comments:

Post a Comment