I have a database with spaces in the field names (not my fault).
I am having a problem with the query because one of the fileds I am joining on has a space in its name. See bolded text.
INNER JOIN employee_general_info
ON employee_passwords.Employee_ID=employees.[Employee ID]
WHERE username = '#username#' AND password = '#password#'
So I get this error message
Error Executing Database Query.
[Macromedia][SQLServer JDBC Driver][SQLServer]Invalid object name 'employees.Employee ID'.
Is there a way to alias the employees.[Employee ID] field?
The error is probably from the SELECT * - try listing all of the fields individually, including the [Employee ID] field. You can give it a new name to appear in the query results by aliasing it:
SELECT [employee ID] AS EmployeeID
but within the query itself you have to use the [Employee ID] syntax.