I have a query that i need to enter facility code and location code from an excel spreadsheet.... The only problem is that sometimes there is only facility code and other times there is facility code and location code.....
Select e.FirstName, e.LastName, e.Address1, e.Address2, e.City, e.State, e.ZipCode, f.Code as FacilityCode, f.Name from Employees e
join Locations l on l.Id= e.LocationId
join Facilities f on f.Id = l.FacilityId
- and e.FullTimeStatus='f' order by f.Code