Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

SQLMode-Selection not working!?

Hi all,

I recently came across an oddity in SQL Studio (7.6.03 Build 10):

When choosing 'ORACLE' as sqlmode SQL Studio GUI displays that it has changed the sqlmode.

But checking in the SESSIONS table shows always "INTERNAL" as sqlmode.

The same happens when using sqlcli:

sqlcli sdb=> \m ORACLE SQL mode changed to ORACLE sqlcli sdb=> select sqlmode from sessions where own='YES' | SQLMODE | | -


| | INTERNAL | 1 row selected (154.150 msec) sqlcli sdb=> sqlcli sdb=> \m ORACLE SQL mode changed to ORACLE sqlcli sdb=> select sqlmode from sessions where own='YES' | SQLMODE | | -
| | INTERNAL | 1 row selected (23.453 msec)

Only when I start sqlcli directly with the sqlmode selection it works. Unfortunately a later change is still not possible.

C:\WINDOWS>sqlcli -d sdb -u lars,lars -S ORACLE Welcome to the MaxDB interactive terminal. Type: \h for help with commands \q to quit sqlcli sdb=> select sqlmode from sessions where own='YES' | SQLMODE | | -


| | ORACLE | 1 row selected (3592 usec) sqlcli sdb=> \m INTERNAL SQL mode changed to INTERNAL sqlcli sdb=> select sqlmode from sessions where own='YES' | SQLMODE | | -
| | ORACLE | 1 row selected (3882 usec)

This happens on 7.6.3 /7.6.4 databases.

Can somebody check this?

Thanks and regards,

Lars

Former Member replied

Hello,

I see the same effect but the behaviour of the SQL editor is changed to Oracle mode.

You can check it with the SQL statements:

Works in Internal mode: select * from tables where rowno < 2

Works in Oracle mode: select * from tables where rownum < 2

The reason might be that the ODBC driver sets the SQL mode for each statement and not for the complete session.

With Database Studio the JDBC driver works as you expect.

SQLMODE SESSIONID OWN;

ORACLE 12.181 YES

Regards

Wolfgang

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question