Name of operator

My pump stations have a HMI key pad where the operator enters an access number to disable the security system. The number gets entered into a PLC register and sent to the SCADA system. I would like to do a number to name display. For example when number is 1111 display John when 2222 display Bill. What is the best way to do this?

You just need a lookup table that translates the numbers to names. For example:

[code]Security_Code | EmpName

1111 | John
2222 | Bill[/code]

And then you can do a simple join to translate your logged security codes to employee names, like:

SELECT L.Date, N.EmpName FROM SecuritySystemLog L, SecurityTranslateTable N WHERE L.Security_Code = N.Security_Code