cancel
Showing results for 
Search instead for 
Did you mean: 

Escape sign not evaluted correctly in String (SQL WHERE constrained)

Former Member
0 Kudos

Hi all,

I use BODS to load data from an Oracle DB to SAP BW on HANA. It works quite nice but now I ran into a problem with the escape sign.

To unload work to the Oracle DB I added a pushdown_sql command (also it is defined in the concept like this) to use reg expression to filter data before (it is more complex like described in this example, because I did not use the BODs functions).

It looks like this:

pushdown_sql('Datastore1', 'regexp_like(TEXT.TEXT_COLUMN,\'^\[0-9\]*$\')')

The SQL statement looks like this regexp_like(TEXT.TEXT_COLUMN,'^\[0-9\]*$')

The escape signs before the brackets are not deleted in the SQL which runs into problems in the selection of the data. But if I delete the escape signs the there is an issue during validation, that BODS thinks there is a variable included in the string.

Any ideas if this is a correct behaviour? Looks like a problem during parsing the string.

Cheers,

Nils

Accepted Solutions (1)

Accepted Solutions (1)

former_member187605
Active Contributor
0 Kudos

It's (almost) in the documentation. SAP Data Services Reference Guide, section 6.3.112 pushdown_sql:

"

Note

Data Services does not allow use of the backslash escape key to delimit curly braces within the pushdown_sql function. So, if your input string contains a curly brace, you must make the string into a variable. Therefore, instead of entering 'a\{b\}c', you would pass your data through as 'a{$x}c' where $x = '\{b\}'.

"

The same applies to square brackets.

Former Member
0 Kudos

I implemented a workaround like this before your reply (missing the hint in the doc) but seriously it feels like a bug.

Cheers,

Nils

former_member187605
Active Contributor
0 Kudos

A documentation bug, it is. At least .

Answers (0)