Sunday, February 19, 2012

how to access sum(Some_Column) in SQL

I am trying to build a new dataset based on existing set, by appending a
total value to the original one. (So I could pass this new dataset into a bar
chart to plot)
I know the sum(Some_column) is in the report domain, since we can access
this value in designer. But my question is how can I pick it out using SQL
statement to build another dataset. Or if there is better way to construct
the new dataset.
Micosoft gurus, please help. I am doing a consulting project at client side
for MS. Do not want to blow this one :)
--
SincerelyHave you tried using the ReportItems collection to reference the sum
field,and use it as a parameter into the other query?
ie
ReportItems!Textbox1.Value
--
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Frank RS" <FrankRS@.discussions.microsoft.com> wrote in message
news:7D89CBF3-D016-459F-B3F3-B1FC58DE3B3A@.microsoft.com...
> I am trying to build a new dataset based on existing set, by appending a
> total value to the original one. (So I could pass this new dataset into a
bar
> chart to plot)
> I know the sum(Some_column) is in the report domain, since we can access
> this value in designer. But my question is how can I pick it out using SQL
> statement to build another dataset. Or if there is better way to construct
> the new dataset.
> Micosoft gurus, please help. I am doing a consulting project at client
side
> for MS. Do not want to blow this one :)
> --
> Sincerely

No comments:

Post a Comment