Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

This content has been archived and is no longer being updated.

Links may not function; however, this content may be relevant to outdated versions of the product.

Issue: Cannot use SQL keywords as database column names

Updated on September 13, 2021

Symptom

If a database column for a PegaRULES table is named the same as a SQL keyword, then errors will occur.

For example, "Key" is a keyword for Microsoft SQL Server.  If a class is created with a property named "Key," and the class is mapped to a table with a column named "Key," then SQL syntax errors occur when accessing the class.

The errors that arise vary depending on the situation.  For example, the following error may occur in Tracer if an instance is written to a Microsoft SQL Server table that has an exposed column named Key, which is a reserved word in that database:

Problem writing an instance to the database: code: 156 SQLState: HY000 Message: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Incorrect syntax near the keyword 'Key'. 

Solution

Do not attempt to store Process Commander instances in a database table that has a column with the same name as a keyword.

Your application can use Rule-Connect-SQL rules and the RDB methods to access such a table, but be careful to create SQL that is free of syntax errors.  Often, this will mean adding double quote characters around any column names that are the same as keywords.

  • Previous topic Issue: CLI Catalog errors after upgrade of DB2 UDB to 8.1 Fix Pak 10
  • Next topic Issue: Must delete temporary files (V4.2SP3 and SQL Server)

Tags

Pega Platform 7.1.1 - 8.3.1 System Architect System/Cloud Ops Administrator Data Integration

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us