Quantcast
Channel: Adobe Community: Message List - ColdFusion
Viewing all articles
Browse latest Browse all 21760

Alias a field name in a join query

$
0
0

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.

 

SELECT *

FROM employee_passwords

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?


Viewing all articles
Browse latest Browse all 21760

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>