tracker issue : CF-4155352

select a category, or use search below
(searches all categories and all time range)
Title:

Coldfusion v2016 using SQL server query using order by right causes error.

| View in Tracker

Status/Resolution/Reason: Closed/Withdrawn/Duplicate

Reporter/Name(from Bugbase): Robert Schwartz / Robert Schwartz (Robert Schwartz)

Created: 05/19/2016

Components: Database

Versions: 2016

Failure Type: Crash

Found In Build/Fixed In Build: CF2016_Final /

Priority/Frequency: Critical / All users will encounter

Locale/System: English / Windows 7 32 bit

Vote Count: 0

Duplicate ID:	CF-4153580

Problem Description:Have query that worked until v2016.  Using order by right(LogNumber,3) DESC get error:
Macromedia][SQLServer JDBC Driver][SQLServer]Incorrect syntax near the keyword 'right'

Steps to Reproduce:

Actual Result:

Expected Result:

Any Workarounds:

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	4155352

External Customer Info:
External Company:  
External Customer Name: Robert Schwartz
External Customer Email:  
External Test Config: My Hardware and Environment details:

Attachments:

Comments:

Query that causes error: SELECT LogNumber FROM tblMain WHERE (Program = 'Apple') ORDER BY right(LogNumber,3) DESC
Comment by External U.
2747 | May 19, 2016 01:30:13 PM GMT
Robert, We are unable to repro this issue on our setup. Please provide the details mentioned below: 1. Database version 2. Database driver being used. 3. Settings summary
Comment by Nimit S.
2748 | May 20, 2016 04:06:55 AM GMT
SQL Server 2012. Others have been able to reproduce see log #CF-4153580 for more information. I've reproduced it on multiple systems and the problem started with v11 update8 and has continued with v2016 and with update1. It only happens when you but the right or left in the order by clause.
Comment by External U.
2749 | May 20, 2016 07:55:19 AM GMT