doSelect web service returns incorrect results when the search parameter has an underscore (_) in it
search cancel

doSelect web service returns incorrect results when the search parameter has an underscore (_) in it

book

Article ID: 62325

calendar_today

Updated On:

Products

CA Service Desk Manager CA Service Management - Service Desk Manager

Issue/Introduction

When using the doSelect operator in SOAP Web Services, search results may be inconsistent when there is an underscore special character in one of the search parameters

This document explains the steps required to resolve the problem of incorrect search results by doSelect web service method.

Ex: WHERE last_name LIKE 'John_Doe'; this returns all names with John Doe with an alphabet between them but not "John_Doe" itself

Environment

Release:  All releases
Component: CA Service Desk Manager

Cause

This happens because the method may interpret underscore (_) as a wild card character and returns matching results and not the value which has an underscore

Resolution

To search for names with an underscore the query needs to be modified to:

WHERE last_name LIKE 'John[_]Doe' , this will return "John_Doe" and not other names with John and Doe in them.