467,076 Members | 985 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,076 developers. It's quick & easy.

summary dilemma

hey all,

i was wondering how you would do this.

i have a webform with a summary page on it. The summary page tells you the
followng:
# of Employees Unchanged
# of Employees Underwriting
# of Employees Approved

On the bottom of the summary table is a grid of employees. initially, i load
all employees for a particular department the viewer belongs to. if the
viewer is an admin the summary table will reflect all employees in all
departments.

the way i have it now is if the viewer is an admin i go ahead and get all
the employees in all departments and load into a dataset. what if there were
8,000? would this be the most efficient way to get the summary table updated?
my opinion is no but not sure of any other way to do it.

thanks,
rodchar
Nov 19 '05 #1
  • viewed: 1065
Share:
2 Replies
Jon
For the summary table I would use aggregate functions in the SQL
I'm assuming approved and underwriting are bit fields

SELECT SUM(CASE WHEN underwriting = 0 THEN 0 ELSE 1 END) AS
underwritingTotal,
SUM(CASE WHEN approved= 0 THEN 0 ELSE 1 END) AS approvedTotal
FROM employee

Thats the quickest way to do the summary. You probably won't want to show
all 8000 employees on the one page (maybe a paged GridView)

Jon

"rodchar" <ro*****@discussions.microsoft.com> wrote in message
news:AD**********************************@microsof t.com...
hey all,

i was wondering how you would do this.

i have a webform with a summary page on it. The summary page tells you the
followng:
# of Employees Unchanged
# of Employees Underwriting
# of Employees Approved

On the bottom of the summary table is a grid of employees. initially, i
load
all employees for a particular department the viewer belongs to. if the
viewer is an admin the summary table will reflect all employees in all
departments.

the way i have it now is if the viewer is an admin i go ahead and get all
the employees in all departments and load into a dataset. what if there
were
8,000? would this be the most efficient way to get the summary table
updated?
my opinion is no but not sure of any other way to do it.

thanks,
rodchar

Nov 19 '05 #2
thank you that makes sense.

"Jon" wrote:
For the summary table I would use aggregate functions in the SQL
I'm assuming approved and underwriting are bit fields

SELECT SUM(CASE WHEN underwriting = 0 THEN 0 ELSE 1 END) AS
underwritingTotal,
SUM(CASE WHEN approved= 0 THEN 0 ELSE 1 END) AS approvedTotal
FROM employee

Thats the quickest way to do the summary. You probably won't want to show
all 8000 employees on the one page (maybe a paged GridView)

Jon

"rodchar" <ro*****@discussions.microsoft.com> wrote in message
news:AD**********************************@microsof t.com...
hey all,

i was wondering how you would do this.

i have a webform with a summary page on it. The summary page tells you the
followng:
# of Employees Unchanged
# of Employees Underwriting
# of Employees Approved

On the bottom of the summary table is a grid of employees. initially, i
load
all employees for a particular department the viewer belongs to. if the
viewer is an admin the summary table will reflect all employees in all
departments.

the way i have it now is if the viewer is an admin i go ahead and get all
the employees in all departments and load into a dataset. what if there
were
8,000? would this be the most efficient way to get the summary table
updated?
my opinion is no but not sure of any other way to do it.

thanks,
rodchar


Nov 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

By using this site, you agree to our Privacy Policy and Terms of Use.