cancel
Showing results for 
Search instead for 
Did you mean: 

Escaping special characters in Oracle - Execute

elise_henschen
New Contributor III

We have an Oracle table that we’re trying to use an Execute snap on. The column names contain $ (t$field is the actual name), which seems to be throwing it off. I’ve tried the following ways, but the snap continues to look for an object, rather than treating it as a string. Is there another way I could try this out?

With the expression toggle enabled:

'SELECT table.t$field FROM owner.tableName table'

'SELECT table.t\$field FROM owner.tableName table'

'SELECT table.t\\$field FROM owner.tableName table'

'SELECT table.t\$$field FROM owner.tableName table'

'SELECT table.t$$field FROM owner.tableName table'

'SELECT table.' + $['T$FIELD'] + ' FROM owner.tableName table'

With the expression toggle disabled:

SELECT table.t$field FROM owner.tableName table

SELECT table.t\$field FROM owner.tableName table

SELECT table.t\\$field FROM owner.tableName table

I keep getting the same error on the snap:

om.snaplogic.jsonpath.UnexpectedTypeException: Expecting object for JSON-Path field reference ‘field’, found: null

Does it just not support having $ in the field names? Anyone know of the proper way to do this or a workaround?
Thanks in advance

2 REPLIES 2

sriram
Former Employee

If your Oracle table has columns whose names contain a ‘$’ (or any other special character) in it, here’s how the execute query needs to look like:

Query: select “USER$ID” from testtable1

3c8ebed92999643a5773160547948020c3186c81.png
11d43268b1b7b17cac283e1622a592b73db20883.png

Note: Expression should not be enabled on the “Oracle Execute” snap

Thank you! That did the trick.