AHD12002/AHD04199 error occurs when the Web Intelligence(WebI) report is performed.

Document ID : KB000032143
Last Modified Date : 14/02/2018
Show Technical Document Details

Question:

When the below SQL query used on the WebI report, the error occurs although the SQL validation check is passed. Is it possible to avoid the error?

[SQL Query]

SELECT
  nr.asset_num,
  nr.class_type,
  nr.family_symbol,
  nr.name,
  ci_contract.con_type
FROM
  nr,
  conx  ci_contract
WHERE
  nr.class_type  IN  ( 'OPTIONAL VALUE'  ) AND
  nr.id = conx.id

[Error Message]

Query 1 - CA Service Desk
Database error occurred. Database error text: [DataDirect][ODBC OpenAccess SDK driver][OpenAccess SDK SQL Engine]AHD12002 method fetch_response error QueryHandler ServiceDesk - 872816771-4: AHD04199: Unknown error occurred. Please contact the administrator. [Microsoft OLE DB Provider for SQL Server] [SQL Code=1013 SQL State=42000]

Answer:

As the following SQL query instead of the above, it is possible to avoid the problem by using the alias.

[SQL Query]

SELECT
  ci.asset_num,
  ci.class_type,
  ci.family_symbol,
  ci.name,
  cx.con_type
FROM
  nr ci,
  conx cx
WHERE
  ci.class_type  IN  ( 'OPTIONAL VALUE'  ) AND
  ci.id = cx.id