ok...Philip.
how should the parameters go?
i cant find any info on CHARINDEX
in my books.
<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.StudioID in (#FORM.StudioID#) --->
AND tblEmployee.FloorID = tblFloor.floorid
ORDER BY CHARINDEX('#newOrderList#',',' | tblJobTitle.TitleID | ',')
, Fullname;
</cfquery>
-paul
-----Original Message-----
From: Philip Arnold - ASP [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 29, 2002 9:04 AM
To: CF-Talk
Subject: RE: ORDER BY question
> Error Diagnostic Information
> ODBC Error Code = 37000 (Syntax error or access violation)
> [Microsoft][ODBC SQL Server Driver][SQL Server]'instr' is not
> a recognized function name.
INSTR is the Access function - CHARINDEX is the SQL Server one
The parameters are also the other way around
Philip Arnold
Technical Director
Certified ColdFusion Developer
ASP Multimedia Limited
Switchboard: +44 (0)20 8680 8099
Fax: +44 (0)20 8686 7911
www.aspmedia.co.uk
www.aspevents.net
An ISO9001 registered company.
**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
**********************************************************************
______________________________________________________________________
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/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists