Blog

Archive for 2008

Returning a Dynamically Specified Number of Rows From a Stored Procedure

Monday, December 22nd, 2008

Have you ever wanted to return the top X number of rows from a query?  Of course you have!  This can be accomplished easily in T-SQL using the TOP option of the SELECT statement.

SELECT TOP 10
       EmployeeID,
       FirstName,
       LastName
FROM   Employee
ORDER BY
       Utilization

But what if the number of rows you want to return is unknown?  Say, for example, this query is for a report and the end-user gets to specify how many results they want.  Unfortunately, T-SQL does not provide the ability to say

SELECT TOP @n

What do you do?  Do you just return all of the results and let the report do the filtering?  This would result in wasted resources in both returning and then removing (or logic to ignore) the extraneous data.  Do you write dynamic SQL, instead, to get the correct number of rows?  Taking this approach would negate some of the benefits of implementing stored procedures in the first place (user security, injection attacts, etc.).

Fortunately, there is a way to do exactly what we want in our stored procedure without resorting to dynamic SQL or worrying about extra data using the SET ROWCOUNT option!

SET ROWCOUNT causes SQL Server to stop processing the query after the specified number of rows are returned (http://msdn.microsoft.com/en-us/library/ms188774.aspx).

/* Set the number of rows to return (from stored procedure parameter) */
SET ROWCOUNT @numberOfResults
/* Execute our query */
SELECT EmployeeID,
       FirstName,
       LastName
FROM   Employee
ORDER BY
       Utilization
/* Set ROWCOUNT back to 0 to return all rows by default */
SET ROWCOUNT 0

Voila!  The exact number of results we want; no extra processing; no dynamic SQL – a little slice of Heaven!

- E.

Making a Difference

Thursday, December 18th, 2008

The holiday season is a special time for giving back, helping others, and committing to a cause greater than ourselves. This year, Five Star is continuing its commitment to help make a difference through a very special partner, Heifer International.

Heifer International has been guided by their effort to end world hunger one person at a time for over 60 years. Their longevity is aided no doubt by their commitment to ensuring long-term solutions for those in need by emphasizing community involvement and sustainable agricultural solutions for people who simply do not have enough to eat.

With success stories stretching around the globe from Africa to Latin America to people here at home, Heifer International is committed to supplying even the most basic of needs, milk and eggs, for example, to people who desperately need it. Through your support, Heifer International will continue its string of success stories in cities and villages around the world.

Learn more about Heifer International by visiting http://www.heifer.org.

Writing a SWF to a Web Page from SQL Server

Thursday, December 11th, 2008

We recently had a requirement to store SWF files directly in our database as a file bytes field. Our client had a need to dynamically change multiple SWF files via an administrative site. Due to the clustered server environment, storing the files in a database and pulling them out on a new request was the best option.

Uploading the file was fairly routine, but actually getting the file out of the database and embedding it in the page proved to be interesting. Not only did we need a way to create this file on the fly, but we also needed it in such a way that the browser would be able to render it as Flash content.

We created an APSX page that required a parameter “id” of the SWF we needed from the database. The files bytes are read from the database as any typical file, execute a sql server stored procedure that returns an Image Data Type containing our file bytes. Then we set the ContentType of the Response to the Multipurpose Internet Mail Extensions (MIME) type “application/x-shockwave-flash”. Finally we write the file bytes to the response stream. IIS will then send the MIME along with the file to the browser.

We initially tried to use the URL of our ASPX page directly in the object and embed tags. Instead of listing our SWF as “filename.swf”, we attempted something more along the lines of “getSwf.aspx?id=1″. A noble idea, but it lead to little more than a blank page. Our next approach was similar, but we used SWFObject to write out the Flash content instead. Again, the URL we passed to SWFObject was an ASPX page that was returning the file bytes of the SWF. Still no luck, just a blank page.

It started to look as if this might not be possible, but then we had a different idea. What if we gave Flash player a shot at rendering the file bytes? We would write our own static SWF that did nothing more than attempt to load a URL it received as a parameter. In this way, we could provide a hardcoded URL to SWFObject and rely on the Player to handle the dynamic piece of the puzzle.

In short, it worked! We wrote a quick SWF (targeted to Flash Player 7) that simply used a MovieClipLoader to load a URL into a container clip. The URL itself was an ASPX page that returned the file bytes of a SWF as stored in the database! Flash player understood the response and was able to load and render the SWF just as if we passed a direct filename with a “.swf” extension.

The Importance of Blended Learning

Wednesday, December 10th, 2008

Recently, a group of Five Star team members attended a discussion, titled Blended Learning: Integrating On-Demand Approaches within Development Programs, between the American Management Association and Bersin & Associates. The discussion focused on the ever-increasing need for organizations to provide solid, blended solutions to support their workforces. Several key concepts resonated from this discussion, and they are shared in this blog.

High-performance organizations understand the necessity of a skilled and motivated workforce, without which business strategies cannot be executed. But today’s workforce is overwhelmed by the volume, speed, and variety of content necessary to do the best job. What can be done to offer support? According to the speakers, organizations must develop and implement:

  • An on-demand infrastructure that allows for a seamless exchange of content that is well-organized and easy to find.
  • Content alliances to share not only content, but processes, standards, tools, and even staff.
  • A suite of solutions that enables workforces to quickly find the right information in the best format at the point of need.
  • Learning professions with expanded competencies to become content brokers, organizers, and facilitators.

It is critical for an organization to understand the needs of its workforce, but it’s even more crucial for that organization to see those needs met. A skilled and motivated workforce can only exist when it’s well-supported and continuously developed. The implementation of a blended learning strategy by focused and aligned leaders is an excellent place to start.

Five Star Ranked 24th in the Top 100 Places to Work in Pennsylvania

Wednesday, December 3rd, 2008

PITTSBURGH, December 4, 2008 — Five Star Development, Inc. announced today that it has been ranked 24th on the Top 100 Best Places to Work in PA for 2008. The program is a public/private partnership of Team Pennsylvania Foundation, the Pennsylvania Department of Community and Economic Development, the Pennsylvania Chamber of Business and Industry, and the Central Penn Business Journal.  Companies from across the state entered the two-part process to determine the 100 Best Places to Work in PA. The first part consisted of evaluating each nominated company’s workplace policies, practices, philosophies, systems and demographics. The second part consisted of an employee survey to measure the employee experience. Nearly 45,000 Pennsylvania employees filled out the survey. The combined scores determined the top companies and the final ranking. Dave Colaizzi, Five Star CEO/CTO and co-founder, commented, “Recognition at this level is only possible when everyone in the organization is fully aligned to our business goals and engaged and committed to their work. That partnership spirit is the foundation of our business.” Five Star accepted the award at a ceremony on December 2 at the Best Places to Work in PA Conference and Awards Ceremony in Hershey, PA.

The Critical Connection between Strategy Execution and High Performance

Monday, November 24th, 2008

Leaders desire to build and people want to work in high-performance organizations, because high-performance organizations execute strategy to achieve measurable results. However, research shows that only 15% of organizations can be classified as high performance.  Yet, the good news is that all organizations have the potential for high performance. The question is, how can that potential be realized?

So, what is the relationship between strategy execution and high performance? The optimization and integration of each of the Five Key Drivers of High Performance™ is essential to achieving and sustaining high-performance organization that execute strategy. As leaders and workforces embark on the journey of creating a high-performance organization, a strategy to optimize and integrate each of the Five Key Drivers must be in place. This strategy must define the long-term direction, priorities, and goals of an organization. During the process of defining the strategy, leaders must evaluate their organizational move through the lens of the Five Key Drivers, which provides the framework for enabling organizations to execute against their business strategy.

Successful execution of a well-defined business strategy, one that is framed around the optimization and integration of the Five Key Drivers, leads to high performance.

Is your organization executing the kind of strategy that leads to high performance?

Why Integrate?

Friday, November 7th, 2008

Integration infers a necessary connection and joining relationship between two or more elements. This definition presumes that these two or more elements, when integrated, function better and are more valuable than any single element alone.

While it is imperative that each of the Five Key Drivers of High Performance™ be optimized for maximum performance value, it is also important that a move to transform any organization be grounded in a strategy that both optimizes and integrates these drivers. Integration enables organizations to multiply the impact of their transformational efforts and create high-performance organizations that execute critical strategy.

Let’s look at an example. Image an organization that has defined a strategy to implement ERP software. Most organizations and their leaders would not dispute the value of creating training programs to build the knowledge and skills of the workforce that will use this software. However, what would happen if key leadership was not focused and aligned around this strategy, or if the organization was designing the software around broken work processes? Sound familiar? Hopefully not. Yet this scenario is frequently encountered by organizations, and it illustrates the need to optimize and integrate the Five Key Drivers across all strategic efforts.  In order to achieve the desired results for any strategy, each of the Five Key Drivers must be individually optimized and cross-functionally integrated.

Is your organization integrating the Five Key Drivers of High Performance across all your strategic efforts?

Enabling a High-Performance Sales Organization

Friday, October 31st, 2008

The highly competitive global market has placed a premium on arming sales forces with the information needed to engage clients in a dialogue about products and services as quickly as possible. Developing customized sales presentations that contain current, branded, and legally approved content can be a challenge for both large and small organizations alike. Sales teams spend valuable time and resources retrieving and verifying relevant information from a variety of different sources for their sales presentations. Time spent searching through old sales presentations and consulting product development and legal departments to validate information is time taken away from their primary role of selling.

To make the process of designing, developing, and delivering more efficient, Five Star recently partnered with one of our largest global clients to develop support tools that leverage this kind of expertise across key organizational departments, including sales, marketing, product, and legal, to deliver on-demand presentations. These “Presentation Builder Tools” allow a sales person to step through a series of questions or options to craft a presentation deck that considers product mix, sales life cycle stage, and competitive intelligence. In a few short steps the salesperson has a current, legally approved presentation to share with their clients. A process that once took several days can be completed in a matter of minutes.

The presentations developed using these tools are not only effective for use with clients, but they also serve to keep sales staff up-to-date on new product offerings and enhancements. The tools can be used to onboard new staff, showcase new product and service offerings, and highlight previous successes. In addition, they can also provide information to augment the presentation, such as audio files that provide talking points about products and lifecycle stages. These clips provide expert direction, pointing to relevant case studies and checklists to help solidify an effective sales delivery.

Solutions like Presentation Builder Tools illustrate the value of integrating the Five Key Drivers. High-performance organizations continuously improve to support their workforce by providing technology that enables the efficient delivery of services to customers. In this case, the Presentation Builder Tools helped our client maximize their sales team’s efficiency by delivering accurate, consistent, and approved offerings to their customers.

What current processes hinder your sales organization’s ability to effectively execute it’s sales strategy?

Why Optimize?

Thursday, October 9th, 2008

If you research the word optimize on dictionary.com, you find the following definitions:

  1. To make as effective, perfect, or useful as possible.
  2. To maximize efficiency and speed in retrieval, storage, or execution.

After reading these definitions several things stand out.

  1. The definitions presume that something already exists, but is not operating at its fullest potential.
  2. Each definition centers on taking action to achieve the fullest potential.

The Five Key Drivers of High Performance are grounded in these assumptions and the belief that all organizations possess three basic elements: People, Process, and Technology. However, a critical difference between low- and high-performance organizations lies in their ability to not just possess these elements, but rather to make them as “effective, perfect, and useful as possible.”

Simply stated, high-performance organizations focus on the hows, not just the whats.

High-performance organizations gain a competitive advantage and deliver results because they optimize their performance in each of the Five Key Drivers:

  • People
    • Focused and Aligned Leaders
    • Skilled and Motivated Workforce
  • Process
    • Integrated Talent Management System
    • Continuous Improvement
  • Technology
    • Enabling Technology

Is your organization optimizing its performance?

Five Star is Selected as One of the Top 100 Places to Work in Pennsylvania

Friday, September 26th, 2008

PITTSBURGH, September 25, 2008 Five Star has been named as one of the Best Places to Work in PA for 2008. The program is a public/private partnership of Team Pennsylvania Foundation, the Pennsylvania Department of Community and Economic Development, the Pennsylvania Chamber of Business and Industry, and the Central Penn Business Journal. Companies from across the state entered the two-part process to determine the 100 Best Places to Work in PA. The first part consisted of evaluating each nominated company’s workplace policies, practices, philosophies, systems, and demographics. The second part consisted of an employee survey to measure the employee experience. Nearly 45,000 Pennsylvania employees filled out the survey. The combined scores determined the top companies and the final ranking.