Skip to content

Query: Qry Get Max Employee Number by Company

Type: Select
Has Parameters: Yes
Has Joins: No
Has Subquery: No

Tables Referenced

  • Companies
  • People
  • Applications
  • Positions

Columns Selected

  • Left([Employee Number],Len([Employee Number Prefix]))
  • Max(Val(IIf(IsNumeric(Mid([Employee Number],Len([Employee Number Prefix])+1,Len(

Where Clause

(((People.[Employee Number]) Is Not Null))

Order By

Left([Employee Number],Len([Employee Number Prefix])), Max(Val(IIf(IsNumeric(Mid([Employee Number],Len([Employee Number Prefix])+1,Len(

SQL

SELECT Left([Employee Number],Len([Employee Number Prefix])), Max(Val(IIf(IsNumeric(Mid([Employee Number],Len([Employee Number Prefix])+1,Len( FROM [People], [Applications], [Positions], [Companies] WHERE (((People.[Employee Number]) Is Not Null))