E-QR: How to Include Reserved Words Such as 'FROM' to String Literals in PSQuery Expressions (Doc ID 786139.1)

Last updated on FEBRUARY 04, 2016

Applies to:

PeopleSoft Enterprise PT PeopleTools - Version 8.40 and later
Information in this document applies to any platform.
***Checked for relevance on 20-AUG-2013***
***Checked for relevance on 04-FEB-2016***

Goal

[UPDATE]  This workaround is no longer valid.  Please refer to Document 1325425.1 for more information.

 

 

When creating a PSQuery expression containing string literals that contain words coinciding with SQL reserved keywords such as FROM, etc., an error will be generated.

For example, the following expression:  

CASE
WHEN A.AUDIT_ACTN = 'A' THEN 'Add '
WHEN A.AUDIT_ACTN = 'D' THEN 'Delete'
WHEN A.AUDIT_ACTN = 'C' THEN 'C(from)'
ELSE 'blah' END

 

will return an error "FROM clauses are not allowed in expressions."

How to use 'from' as a part of a string literal without getting that error?

Solution

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms