Tuesday, June 17, 2003


Source: Stephen Forte's Radio Weblog; 6/17/2003; 3:36:16 PM

New York, NY

Long Live TSQL

Why can I never remember the IsNull(foo,0) function in SQL Server. It is an ISNULL or NZ type of function that converts a null value to the item specified, which in this case is a zero. I don't know why I forget this code all the time is that I go back to my Access roots and try to do an NZ() or the Null to Zero function specific to the Access object model. (Old habits die hard!) Well I can usually IM my good friend Al for help, which I did today, but now here is an example of using IsNull in a TSQL string:

update tblSummaryByLocation_WebSublocation
set LocalNewsPaper=IsNUll(LocalNewsPaper1,0)+IsNUll(LocalNewsPaper2,0)+IsNUll(LocalNewsPaper3,0)
WHERE Weekending_ID= @Weekending_ID

 

I am also sick of using the CASE statement, this code requires me to know something about my data, can' t wait for the Yukon PIVOT keyword:

SELECT     dbo.tlkpWeekEnding.WeekEnding_ID, dbo.tlkpWeekEnding.WeekEnding_DT, dbo.tlkpLocation.Location_ID, dbo.tlkpLocation.Location_NM,
                      dbo.tblLocationSub_WebMapping.WebSublocation_ID,
                      dbo.tblLocationSub_WebMapping.WebSublocation_DS,                       SUM(TotalListings) AS GrandTotal, SUM(CASE tlkpServiceProviders.Service_NM WHEN 'Hot Jobs' THEN TotalListings ELSE 0 END) AS HotJobsTotal,
                      SUM(CASE tlkpServiceProviders.Service_NM WHEN 'Monster' THEN TotalListings ELSE 0 END) AS MonsterTotal,
                      SUM(CASE tlkpServiceProviders.Service_NM WHEN 'Career Builder' THEN TotalListings ELSE 0 END) AS CareerBuilderTotal

FROM         dbo.tblData INNER JOIN
                      dbo.trelServiceURL ON dbo.tblData.URL_ID = dbo.trelServiceURL.URL_ID INNER JOIN
                      dbo.tlkpLocation ON dbo.trelServiceURL.Location_ID = dbo.tlkpLocation.Location_ID INNER JOIN
                      dbo.tlkpServiceProviders ON dbo.trelServiceURL.Service_ID = dbo.tlkpServiceProviders.Service_ID INNER JOIN
                      dbo.tlkpWeekEnding ON dbo.tblData.WeekEnding_ID = dbo.tlkpWeekEnding.WeekEnding_ID INNER JOIN
                      dbo.tblLocationSub_WebMapping ON dbo.tlkpLocation.Location_ID = dbo.tblLocationSub_WebMapping.Location_ID INNER JOIN
                      dbo.tblLocationSub_WebMapping_Detail ON
                      dbo.tblLocationSub_WebMapping.WebSublocation_ID = dbo.tblLocationSub_WebMapping_Detail.WebSublocation_ID INNER JOIN
                      dbo.tblLocationSub ON dbo.trelServiceURL.SubLocation_ID = dbo.tblLocationSub.SubLocation_ID AND
                      dbo.tlkpLocation.Location_ID = dbo.tblLocationSub.Location_ID AND
                      dbo.tblLocationSub_WebMapping_Detail.Sublocation_ID = dbo.tblLocationSub.SubLocation_ID

Where tlkpWeekEnding.weekending_id= @Weekending_ID

GROUP BY dbo.tlkpWeekEnding.WeekEnding_ID, dbo.tlkpWeekEnding.WeekEnding_DT, dbo.tlkpLocation.Location_ID, dbo.tlkpLocation.Location_NM,
                      dbo.tblLocationSub_WebMapping.WebSublocation_ID, dbo.tblLocationSub_WebMapping.WebSublocation_DS, dbo.tblLocationSub.SubLocation_ID,
                      dbo.tblLocationSub.SubLocation_DS

 

 

[Stephen Forte's Radio Weblog]
4:19:38 PM    trackback []     Articulate [] 

Source: Phil Wolff: technology; 6/17/2003; 7:32:06 AM

Can you apply Theory Of Constraints to Human Capital?.

Frank Patrick (one of the deepest thinkers on project management in our time) catches the new chapter on Critical Chain Scheduling in Ed Yourdan's new second edition of Death March. The book is mandatory reading for every project worker.

I like one of Yourdan's anecdotes:

My colleague Tom DeMarco likes to tell the story of consulting clients he visits, who ask him, "If we could do just one thing to improve our project-management situation, what would it be?" Tom's answer is often simple: "Stop assigning people to work on five or six unrelated projects simultaneously; give everyone one project to work on, and leave them alone until they finish that one project."  Invariably, says Tom, the response is, "Well, yeah, that sounds very rational.  But you don't understand, that just wouldn't work in our organization -- because in our organization we have constraints A, B, and C, and we have to deal with political problems X, Y, and Z, so give us another one thing that could make all of our project management problems go away."  Any suggestion that attacks the dysfunctional behaviors in the organization is almost certain to be rejected with the phrase, "Well, maybe that would work in a perfect world -- but in the 'real world' where we operate, it could never happen because of X, Y, and Z"  And the organization eventually finds a "pill" -- a new development tool, a new systems analysis methodology, a new buzzword -- that may bring short-term relief, but rarely attacks the underlying problems.

Changes, deep ones, important and worthwhile, shake us.

The chapter is about more than change. It is about applying Goldratt's Theory Of Constraints (TOC) to project scheduling. It requires a different set of values, behaviors, incentives, measures, and project controls. So this calls for extensive change.

Human Capital Constraints

How can we apply the Theory Of Constraints to workforce planning and recruiting?

Where are the bottlenecks to be overcome?

Can the system design be reconsidered in light of the TOC?

What assumptions and dogma are worth challenging?

What new values, behaviors, incentives, measures, and controls will lead to more of what we want?

How can we get more of the right people on our radar? Spend more time spent in meaningful conversation and less on paperwork? Shorten our cycle times while increasing our quality?

Along the way, can we take some of the strain out of the process?

Now on my reading list:

P.S. When I was a kid I wanted to grow up to be a systems engineer. In high school I wanted to be an operations research analyst, reading Naval Operations Analysis. By nineteen I was working for the Naval Supply Systems Command as a civilian operations research analyst. My favorite book in the whole world was Quick and Dirty OR. Just to explain the utter and complete geekiness of this post.

[Phil Wolff: technology]

7:57:02 AM    trackback []     Articulate []