Error Diagnostic Information
ODBC Error Code = 22005 (Error in assignment)
[Microsoft][ODBC SQL Server Driver][SQL Server]The data type int is invalid
for the charindex function. 
Allowed types are: char/varchar, nchar/nvarchar, and binary/varbinary.

<cfset newOrderList = ",25,26,28,4,">

<cfquery name="Employees" datasource="RPH"
cachedwithin="#CreateTimeSpan(0,0,30,0)#">
SELECT
LEFT(RTrim(tblEmployee.Lastname),10)+', '+tblEmployee.Firstname as Fullname,
tblEmployee.EMPLOYEE_ID, tblEmployee.EmployeeID, tblEmployee.StudioID,
tblEmployee.StatusID, tblEmployee.TitleID, tblStudio.StudioID,
tblStudio.OfficeID, tblStudio.StudioName, tblOffice.OfficeID,
tblOffice.City, tblPhone.PhoneNumb, tblPhone.PhoneTypeID, tblFloor.floor,
tblJobTitle.TitleID, tblJobTitle.Title

FROM tblEmployee, tblStudio, tblOffice, tblPhone, tblFloor, tblJobTitle

WHERE tblEmployee.studioid = tblStudio.studioid
AND tblEmployee.TitleID = tblJobTitle.TitleID 
AND tblOffice.OfficeID = tblStudio.OfficeID
AND tblJobTitle.TitleID IN (25,26,28,4)
AND tblPhone.EmpResID = tblEmployee.EmployeeID
AND tblPhone.PhoneTypeID = '1'
AND tblEmployee.FloorID = tblFloor.floorid 

ORDER BY CHARINDEX(',' + tblJobTitle.TitleID + ',' , '#newOrderList#')

</cfquery>

-paul
______________________________________________________________________
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to