I was completely wrong about what I understood about GROUP BY with FOR XML PATH() commands.
I specifically asked about this at TechED last year and just never actually tried it, I just took it for granted that it didn't work for some reason. For the heck of it (and out of complete frustration), I did try it a week ago and lo and behold it just worked...
I quickly tore apart some old procedures that FINALLY got upgraded to SQL2005 and the difference in the code and speed where dramatic! I am totally happy with this solution.
The following works perfectly fine (and fast...)
SELECT
RequestorID As '@RequestorID',
dbo.fn_GetLBRequestorName(RequestorID,@LocationUID) As '@RequestorName',
Count(LogEntryID) as '@Entries',
Sum(Pages) as '@Pages',
Sum(Billable) as '@Billable',
Sum(CASE Billable WHEN 0 THEN 1 ELSE 0 END) as '@NonBillable',
Sum(CASE WHEN ((Date_Completed > '01/01/1900')) THEN 1 ELSE 0 END) as '@Completed',
Sum(CASE WHEN ((Date_Completed < '01/01/2000')) THEN 1 ELSE 0 END) as '@Incomplete'
FROM
LogEntry
WHERE
(LocationUID = @LocationUID) AND
(
((@StartDate is Null) OR (@EndDate is Null)) OR
(Date_Received between @StartDate and @EndDate)
)
GROUP BY RequestorID
ORDER BY RequestorID
FOR XML PATH('Requestor'), TYPE, ROOT('Requestors')
I will be putting an updated article up revealing my findings and the sheer delight it is to create Structured XML with SQL 2005. The SQL 2000 Solution is over here and is pretty ugly.
I have become increasingly concerned that Toshiba is going to pull the M7 from production.
Whether this means they are replacing it with something better or overhauling it I don't know.
What I do know is very suspicious…
- The RTM Vista drivers are STILL not available, every other machine Toshiba supports for Vista has drivers ready…
- You cannot buy an M7 at ToshibaDirect any more, meaning something other than currently out of stock…
- You could not get a Core2 Duo for this machine (at least not from Toshiba)
- The NVidia Option just barely supported Vista, the Intel Option did not support Aero at all
- The M7 has had a slew of problems upgrading to Vista
So, with that in mind and Toshiba advertising this machine as:
The Premier Tablet PC
The Tecra® M7 is the premier high-performance Tablet PC for mobile users that demand the increased productivity of a Tablet PC
I am led to believe that either lackluster sales of this machine, the choice to make the LCD only 1440x900 (instead of 1920x1200), or upgrade problems could mean there is a new flagship product coming very soon.
To be honest, when this machine runs, I really love it. I don't want to replace it just yet (I only bought it a year ago…)
If a new machine comes out soon, I think I will just go ahead and upgrade if it is a Core2 Duo, has higher resolution, a better video card and is fully supported for Vista by Toshiba. The weight of this machine with the optional wedge battery doesn't really bother me, though it does bother many people.
I will be keeping a sharp lookout for any mention of a new machine on the horizon, there just isn't any other machine I would rather use for my MAIN portable system, I am completely hooked on Widescreen and Tablet together, no other machine even comes close to offering what this package does for me.
Update:
Indeed, my suspicions are confirmed...
Looks like I will be getting a new Tablet soon.
Requirements:
- 14” Widescreen
- CoreDuo or Core2Duo
- 2Gb RAM (more preferred...)
- Vista Aero Support
- Tablet... I will never buy another notebook that is NOT a tablet.
If the 15.4” MacBook Pro was a Tablet, there would be no question what I would get...
If this thing is real... Then I MAY be getting it, no pre-orders for me, I need to see at least one review first.
Copyright © 2003-2004 H. Steele Price, IV -
All opinions are my own, not necessarily those of my employer, your mother, or any government agency.