.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Hierarchy Employee Listing

Posted By:      Posted Date: October 12, 2010    Points: 0   Category :Sql Server
I am trying create a SQL extract file that has the following layout below.

User  UserBoss Level1 Level2 Level3 Level4 Level5
John               John
Bob    John      John    Bob
Tom    Bob       John    Bob   Tom
Doug   Tom      John    Bob   Tom    Doug
Brad   Doug      John    Bob   Tom    Doug   Brad
Lee    John       John    Lee
Sue    Lee        John    Lee   Sue

This listing doesn't have to be sorted in this order and anyone in the listing could have multiple people reporting to them. Any ideas?

Currently, I have a sql recursive query (plus case statements) working that ranks employees and then puts them in the levels hierarchy as described above. However, I c

View Complete Post

More Related Resource Links

employee hierarchy using trace tree



I am looking to create an employee hierarchy in a trace tree ( any other suggestions most welcome ) and have 2 specific fields in my table ( employee , reports to )

Now a sample data looks like follows

Employee     Reports to

User A           Manager A

Manager A     Senior manager A

User B           Senior Manager A

User C          Manager A

so on and so forth 

Now how do I get a trace tree so that when i click on Senior manager A  I get Manager A and User B , and then expand manager A to get user A and User C. 

I have been looking around a lot but cannot find a solution. 

Help appreciated. 

suppressing two highest levels of employee hierarchy in excel


Hi.  My recollection is that in mgt studio's cube browser I can drag the highest level executives off an employee hierarchy pivot by dragging level numbers.  After all, we know who the ceo is and the ceo's direct report as well.

I dont see this capability in excel 2007.  When I unclick these top level execs in the filter already being used to hide ex employees, excel still shows the two highest level execs.  Is there an elegant way to suppress them in excel?  I dont want to remove them from the cube, just to suppress them in one particular excel pivot.

Hierarchy ID: Model Your Data Hierarchies With SQL Server 2008


Here we explain how the new hierarchyID data type in SQL Server 2008 helps solve some of the problems in modeling and querying hierarchical information.

Kent Tegels

MSDN Magazine September 2008

Test Run: The Analytic Hierarchy Process


Most software testing takes place at a relatively low level. Testing an application's individual methods for functional correctness is one example. However, some important testing must take place at a very high level-for example, determining if a current build is significantly better overall than a previous build.

James McCaffrey

MSDN Magazine June 2005

Display Employee Record


I have employee table and qualification table

Each employee has multiple qualifications

Now what i want to display is employees basic information like name, identity card, designation etc..

With all the qualification he/she has

please let me know how can i do that

Following is situation which i dnt want


Identity card :123


Qualification one


Identity card :123


Qualification two

Error in / Application after adding employee search in webpart


Hello everyone,

I am working on sharepoint 2007 and I was editing the webpart of the software and after adding the predefined employee search table, the server has crashed while trying to access the server remotely with the following error message:

Error in / Application

However, while trying to login locally I have no problem and can easily login.

What will be the course of action in fixing this error.

Also the site is complaining of an invalid certificate even after adding an exception.

Any help would be greatly appreciated.

Thank You,

Chris Stanko

Organization Hierarchy - Manger not showing


SharePoint 2007 SP2 on Server 2008 R2

I am doing a custom profile import using AD and a BDC connection.  All the data comes in and populates correctly, including the 'Manager' field which is being populated from the BDC entity. All main fields are being populated from the BDC entity.  Fields are; First name, last name, email, office and cell phone, and manager.

However, when viewing the Organization Hierarchy, the users 'Manager' is not showing up in the Hierarchy. Nothing above the current user is shown in the Hierarchy.  The Manager field is populated with a valid user.  If I display the Manager field in the 'Details' section, I can see the name and click on it to see their profile page as well, so it is all valid and accurate.

Colleagues ( users with the same Manager ) are listed in the Hierarchy, but none of their hierarchy's show the manager either.

I have deleted every profile and then done a full import several times with the same result. Incremental import does ont have any affect either.

Any suggestions or advice on how to get the Manager to display?

Thanks to all!


Video: SharePoint 2010 Object Model Hierarchy

This video describes the hierarchy of the most commonly-used objects in SharePoint 2010. (Length: 2:18)

"Views" Listing Permission

I'm currently experiencing a problem whereas a once funtioning "view list" assigned to one of my tables is no longer displaying in the upper right hand side of said table... Additionally, when I go into "list settings" from the page and re-add the created view(s) for public viewing, it will show up on the page initially, "but" when I exit out of the page and come back to it, it's gone again! Has anyone else seen this before? JayCERTIFIED: CCNA, Network+, Security+, Server+, I.T. Project+

MDX to get a count on a hierarchy

Hi I want to get the number of customers that placed orders for items from more than 2 Product Category in a month in the Adventure Works 2008 DW database. Can someone help me with the MDX expression? thanks

How Does one Create an Employee Directory with WSS

Hi,I am trying to build an employee directory (or a who is who list)page for our organisation's intranet. We are using WSS 3.0, not moss, is there any way to accomplish this task.  I have searched on the net for solutions but just cant seem to find any except maybe for moss. We already have AD. Any suggestions or help would be appreciated as I have been trying to find a solution in the last couple of weeks, thanks.

How to get in which shift the maximum of time the employee falls?

DECLARE @CheckInTime AS TABLE(EmpID INT, InTime DATETIME, OutTime DATETIME) INSERT INTO @CheckInTime SELECT 1, '1900-01-01 00:50:00.000', '1900-01-01 08:50:00.000' UNION ALL SELECT 2, '1900-01-01 09:45:00.000', '1900-01-01 14:45:00.000' UNION ALL SELECT 3, '1900-01-01 14:20:00.000', '1900-01-01 22:45:00.000' UNION ALL SELECT 4, '1900-01-01 08:30:00.000', '1900-01-01 06:45:00.000' --SELECT * FROM @CheckInTime DECLARE @ShiftMaster AS TABLE([ShiftID] [int], [Name] [varchar](50) NOT NULL, [StartTime] [datetime] NOT NULL, [EndTime] [datetime] NOT NULL) INSERT INTO @ShiftMaster SELECT 1, 'G', '1900-01-01 09:30:00.000', '1900-01-01 22:00:00.000' UNION ALL SELECT 7, 'F', '1900-01-01 00:00:00.000', '1900-01-01 08:00:00.000' UNION ALL SELECT 8, 'S', '1900-01-01 08:00:00.000', '1900-01-01 16:00:00.000' UNION ALL SELECT 9, 'T', '1900-01-01 16:00:00.000', '1900-01-01 23:59:00.000' There is no relationship between @ShiftMaster and @CheckInTime. Here emp 1 should comes in F shift. He also falls in S shift. But he works more than F shift when compared to S shift Here emp 2 should comes in G shift Here emp 3 should comes in T shift (because he works more time in T shift) Here emp 4 should comes in S shift I wants to get (ShiftID) in which shift he works for more time. Thanks, Babu Kumarasamy.

WWF and hierarchy

Good morning guys: We are currently on the process of doing some research to find the right technology for our next project and even I've read a bit on WWF I have these questions that I would really appreciate if anyone can help me solve these: 1. We have a product component hierarchy, it means a product is composed by many components. Products and components might have different states (state machine), so, is it possible to define an workflow that handles this hierarchy? I mean, finally this is like 2 workflows right? 2. Would these be like 2 different workflows? Thanks for any help!

Business explainfor tables and hierarchy in AdventureWorks database and REAL_Warehouse_Sample_V6 cub

AdventureWorks (ProductModel table, what is this table for) ------------------------------ REAL_Warehouse_Sample_V6 (Periodicity(only have one attribute:period)) (Replen Strategy(three level hierarchy(strategy type:backlist,frontlist);(strategy:Modeled,Buyer Managed,No replenishment,Store Managed)) Another one is what is the difference and relation between buyer and customer in cube REAL_Warehouse_Sample_V6? -------------------------------------------- I can not understand the business meaning behind these tables and architecture,can any one help explain the meaning for upper hierarchy and table? happyMan

Unable to get Lastperiods 4 periods in time hierarchy at different levels.

Hi, I am unable to get last 4 periods when the weeks are falling at two different months. Example: The calendarsales contains the following hierachy : Year, HalfYear, Quarter, Month, Week August month contains the following weeks:1033,1034,1035 July month contains the follwing weeks: 1032,1031,1030. So i am selecting the week 1035 and i need last 4 weeks till 1032. But the below qry is returning last 3 weeks 1035,1034,1033. It is unable to retrieve 1032 as it is coming under previous month of July.  Below is the mdx query i am using. **************************************** WITH     SET ORDEREDCAT AS   Order ( [Dim_Product].[ProductDefaultHierarchy].[Category]. MEMBERS ,[Measures].[Sales Units] , BDESC )     MEMBER [Measures].[SalesUnits_L_4WKBP] AS   Sum ( ( {   LastPeriods (4 ,[Dim_RetailerSalesCalendar].[CalendarSales]. CurrentMember ) } ,[Measures].[Sales Units] ) )     SELECT     NON EMPTY {[OrderedCat]} ON 1 ,{ [Measures].[SalesUnits_L_4WKBP]     } ON 0 FROM   [Aroyale] WHERE   {[Dim_Retailer].[Retailer].&[5]}* {[Dim_RetailerSalesCalendar].[CalendarSales].[week].&[1035]} ***************************** Please can any one help me on this. Regards, Srini.

ASP.NET employee holiday/vacation tracker application

Hi guys,I am creating an application in ASP.NET that automates the process of booking/authorising employeee holiday/vacation requests. Essentially I would like it to:allow employees to login as themselves to view their current holiday entitlement, as well as their remaining balanceallow employees to make holiday/vacation requests and have these submitted to line managersallow management to have enhanced privileges to view outstanding requests and authorise/deny them electronicallyallow management to create reports regarding employees and their requested time offSo far, I have used the various tutorials on the site to create the database tables in SQL Server and code the login process successfully. As well as this I also have an administration function, used by management, to control access to the system as well as assigning specific job roles to new employees. Based on these job roles, employees have access to different parts of the system.My next task is get the logic and code correct for the creation, submission and authorisation of time off requests. I was wondering if anyone knew of or has built any similar types of applications or code that I could look at as a guide and use as a basis to build on and extend my application? I have been looking, but nothing I've found quite matches what I am after.Any help or guidance is appreciated.Thank you

modelling SCD2 hierarchy changes in analysis services 2005

its seems to me its really not possible to implement SCD2 changing hierarchy in analysis services such the hierarchy is properly displayed in excel. for instance if scd2 changes happen on leaf level then excel correctly shows the data but if they happen on branch level analysis services picks up one parent eg at time 1 hierarchy looks like this A->B at time 2 hierarchy is A->C when hierarchy is displayed in excel 2007 it shows      time       1       2 C    100   200   A  100    200   but this not a correct display of hierarchy changing over time the correct display is this      time       1       2 B    100   A  100 C            200   A          200      
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend