You are on page 1of 1

Copyright (c) 2024, Oracle. All rights reserved. Oracle Confidential.

Simple SQL Query Fails When Configuring The OIC Oracle Database Adapter But Runs
Successfully in SQLPlus (Doc ID 2663145.1)

In this Document

Goal
Solution
References

APPLIES TO:

Oracle Integration-OIC - Version 18.2.5 and later


Information in this document applies to any platform.

GOAL

Why does the simple sql query:

select column, sum(number)


from table

complete successfully, but when adding a 'group by' clause

select column, sum(number)


from table
group by column

returns the database error ORA 00933: SQL command not properly ended error?

SOLUTION

When executing a SQL query using the Database Adapter, the best practice:

1. For short queries: Remove all formatting, in the command in the OIC trigger, and write the command as a single
continuous line, i.e.: SELECT FIELD_1, FIELD_, FROM TABLE_X GROUP BY FIELD_1

2. For longer queries: Stored Procedures are the best fit for cases where the query is a bit complex, involving multiple
clauses with multiple input/bind parameters and nested selects, or those can not be modeled via PureSQL.

REFERENCES

Didn't find what you are looking for?

You might also like