Thank you Richard.
I will have to flag this one and come back to it.
My database structure may require something of this measure down the
with the auditing ability I plan on building into the admin section.
Never heard of USE AdventureWorks. Is that a SQL system function?
Or just a table in the examples database?
On Jan 21, 2011, at 6:16 AM, Richard Quadling wrote:
You also have (depending upon your SQL engine and version) something
called common table expressions.
(From MS SQL Books Online) ...
WITH DirReps(ManagerID, DirectReports) AS
SELECT ManagerID, COUNT(*)
FROM HumanResources.Employee AS e
WHERE ManagerID IS NOT NULL
GROUP BY ManagerID
SELECT ManagerID, DirectReports
ORDER BY ManagerID;
Guess I will have to do some googling.. :)
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php