Skip to Content
0

Dynamic select on external oracle DB does not work

Nov 17, 2016 at 03:09 PM

18

avatar image

We try to make a native SQL-Select from an SAP MAX-DB onto an external oracle DB (11.g )

We can open the connection without any problem.

When we make a select with a literal in the WHERE Clause we get the correct information back

EXEC SQL.

SELECT RECIPE_BLOCKED INTO :ZRECIPE_BLOCKED FROM RECIPESWHERE RECIPE_NUMBER = '00'

ENDEXEC.

But:

When we make a select with a host variable, in this case the '00'

we get sometimes the right information back and sometimes nothing.

EXEC SQL.

SELECT RECIPE_BLOCKED INTO :ZRECIPE_BLOCKED FROM RECIPESWHERE RECIPE_NUMBER = :MYRN

ENDEXEC.

In the cases where we get no result, we also do not get an error, but the parameters in the NLS_Parameter table on the oracle side are somewhat strange.

For example the Language is sometimes: “AMERICAN#######” or some bizarre Asian characters.

The ConnectionString for the Connection is “….:AMERICAN_AMERICA.UTF8“.

On SAP we do have Unicode, on oracle we do have America as Language and AL32UTF8 as Characterset

Is there any idea what went wrong?

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers