Thursday, November 19, 2020

#813 - OIC - Complex SQL processing

How to decide if an SQL statement is complex?

Easy for me - if it goes beyond the basic SELECT x FROM y WHERE ... then it's complex for me.

Here I have the following statement that retrieve data from my CUSTOMERS table - 

SELECT CUST_NAME, CREATED_DATE, MODIFIED_DATE, DEFAULT_ADDRESS, COMPANY_SIZE FROM CUSTOMERS WHERE CREATED_DATE > #lastDate ORDER BY CREATED_DATE DESC OFFSET #offset ROWS FETCH FIRST 1000 ROWS ONLY









I execute the SQL in SQLPLUS - 




Looks good - now to trying this in OIC -














Essentially a REST trigger.

Then the DB adapter (GetCustomers) - configured as follows -












The Mapping - as you can see, I simply hard code test for test purposes -








I then loop over each customer and simply LOG the customer name -


















I finally return all customer names.

Now to testing -



No comments:

Post a Comment