Skip to Content
avatar image
Former Member

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

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

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Best Answer
    Mar 29, 2016 at 12:22 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded