Home Forums SQL Server 2005 T-SQL (SS2K5) T-SQL Function that works like the FIRST funcion in MS Access? RE: T-SQL Function that works like the FIRST funcion in MS Access?

  • Hmm... the only problem with this is I don't think the code takes into account what the SpaceType is.

    I need the Name1 column to say Vacant "SpaceType" only if the SpaceType is a workspace or an office and there is no employee allocated to that particular Space_Number. (Ideally when there is a vacant workspace, then Name1 will read Vacant Cubicle, instead of vacant workspace).

    Otherwise, it should remain Null. So if the SpaceType is Restroom for example, I do not the Name1 to read Vacant Cubicle, nor do I want it to read Vacant Restroom.