I'm trying to do a simple query in ColdFusion as follows but am not getting any results?? I can do this query directly in Oracle SQL Developer and the results are fine. However when I put the query in coldfusion it's not working? No error, no records returned? I also recreated these tables in SQL Server and used this same query in coldfusion and it works like a gem.
<cfquery datasource="test" name="qTest">
SELECT EmployeeID, FirstName, LastName
FROM EmployeeRefresh r JOIN EmployeeInfo i ON r.EmployeeID = i.Employee_ID
WHERE TRIM(r.building) <> TRIM(i.building)
<cfquery>
<cfoutput query="qTest">
#EmployeeID# - #FirstName#, #LastName#
</cfoutput>
Just some background, that you'll notice there is EmployeeID and Employee_ID. Unfortunately these are how the tables are setup that I inherited so I'm working with what I have. Basically the EmployeeRefresh table gets updated nightly from our employee data warehouse. Then I want to check and return all employees who have updated their building information.
<cfquery datasource="test" name="qTest">
SELECT EmployeeID, FirstName, LastName
FROM EmployeeRefresh r JOIN EmployeeInfo i ON r.EmployeeID = i.Employee_ID
WHERE TRIM(r.building) <> TRIM(i.building)
<cfquery>
<cfoutput query="qTest">
#EmployeeID# - #FirstName#, #LastName#
</cfoutput>
Just some background, that you'll notice there is EmployeeID and Employee_ID. Unfortunately these are how the tables are setup that I inherited so I'm working with what I have. Basically the EmployeeRefresh table gets updated nightly from our employee data warehouse. Then I want to check and return all employees who have updated their building information.