Login   Register  
PHP Classes
elePHPant
Icontem

File: SqlFunc/OrganizationTree.sql

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Andras Toth  >  SQL Proc Func  >  SqlFunc/OrganizationTree.sql  >  Download  
File: SqlFunc/OrganizationTree.sql
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: SQL Proc Func
Run stored procedures and queries read from files
Author: By
Last change:
Date: 7 months ago
Size: 404 bytes
 

Contents

Class file image Download
/**
 * This is a demo function using AdventureWorks2012 database
 * @SalariedFlag bit
 * @OrganizationLevel int
 */
SELECT e.JobTitle
	,e.OrganizationLevel
	,p.FirstName
	,p.MiddleName
	,p.LastName
FROM HumanResources.Employee e
INNER JOIN Person.Person p ON e.BusinessEntityID = p.BusinessEntityID
WHERE e.SalariedFlag = ?
	AND e.OrganizationLevel >= ?
ORDER BY e.BusinessEntityID
	,e.OrganizationLevel