473,785 Members | 2,289 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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
2 1227
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
underwritingTot al,
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*****@discus sions.microsoft .com> wrote in message
news:AD******** *************** ***********@mic rosoft.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
underwritingTot al,
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*****@discus sions.microsoft .com> wrote in message
news:AD******** *************** ***********@mic rosoft.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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
3167
by: hzmonte | last post by:
Correct me if I am wrong, declaring formal parameters of functions as const, if they should not be/is not changed, has 2 benefits; 1. It tells the program that calls this function that the parameter will not be changed - so don't worry. 2. It tells the implementor and the maintainer of this function that the parameter should not be changed inside the function. And it is for this reason that some people advocate that it is a good idea to...
0
9647
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10357
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10162
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10101
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9959
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7509
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5528
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4063
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2893
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.