|
-- >Does anybody know how I would create, an SQL program that would allow me to >create a multi level cross-tab result set? > >columns could be layered by : Manager and then Department and then >Employee... >And the rows would be : Work Area and then Project >With a sum (of) hours at the intersection... > >This seems to entail, reading and creating a cursor for distinct columns, >and then process the distinct rows, for a given where clause... Tim, Do you want to create a spreadsheet like lay out,such as: Manager Department Employee Work Area 10 120 80 Project 9 43 35 Cups of coffee 3 55 12 etc ... Then I think you should look into the Kronecker Delta Functions (MC once had an article on that with Query/400 (have to look that up)). I have written some QM queries using those functions using UNION (perhaps CASE may do it as well). Unfortunately, I was not capable to do it in a single query, but had to output to an outfile and use that outfile in a second query. If this is what yountry to achieve I put in some examples. (Not possible now, being at home). Regards, Carel Teijgeler. --
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.