Hey all, Happy Mondays.
This thing's frustrating the heck out of me.
<!--- Loop through the user's positions --->
<cfloop query="PositionQuery">
<cfset indexWhere = indexProjectsWhere & " OR
(ProjectTable.EmployeeID=0 AND (ProjectTable.HRPositionID=" &
#HRPositionID# & " AND ProjectTable.Status<>'closed2'))">
</cfloop>
and here's the SQL from the query:
SELECT ProjectTable.ProjectID, ProjectTable.ProjectTypeID,
ProjectTable.ProjectName, ProjectTable.EmployeeID,
ProjectTable.HRPositionID, ProjectTable.Status,
ProjectTypeTable.ProjectType
FROM ProjectTable RIGHT JOIN ProjectTypeTable ON
ProjectTable.ProjectTypeID = ProjectTypeTable.ProjectTypeID
WHERE (ProjectTable.EmployeeID=#EmployeeSession# AND
ProjectTable.Status<>'closed1')#indexProjectsWhere#
ORDER BY ProjectTable.ProjectName
I'm getting: "Incorrect syntax near 'closed2'."
Yet if I output the raw sql, it runs fine in Access. And if I paste the
output of indexProjectsWhere it works fine. Some problem when going
from the variable to the sql.
Any ideas?
thx.
Chad
---
You are currently subscribed to cfaussie as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/