Coalesce is supported in both Oracle and SQL Server and serves essentially the same function as nvl and isnull. (There are some important differences, coalesce can take an arbitrary number of arguments, and returns the first non-null one. The return type for isnull matches the type of the first argument, that is not true for coalesce, at least on SQL Server.). PL/SQL offers modern software engineering features such as data encapsulation, exception handling, information hiding, and object orientation. It brings state-of-the-art programming to the Oracle server and toolset. PL/SQL provides all the procedural constructs that are available in any third-generation language (3GL).
Active10 months ago
I am working with Oracle APEX and I'm trying to store a dynamic sql query in the PL/SQL Function body. Here is my current SQL query for a classic report:
I am trying to store the 'tablename' in a page item so that whenever a user changes the page item, this query will automatically pull from the given table. I've attempted to build a pl/sql function around this but continue to run into errors with the 'strings'.
Does anyone know how to convert this in to a dynamic pl/sql function?
Thanks in advance.
Littlefoot33.6k77 gold badges1717 silver badges3636 bronze badges
![Apostila Pl Sql Oracle Portugues Apostila Pl Sql Oracle Portugues](http://1.bp.blogspot.com/-_v0keqve848/U_8pZAu-KeI/AAAAAAAAAl0/bvgyLW3nyDw/s1600/Sem%2Bt%C3%ADtulo.jpg)
aphibuiaphibui
1 Answer
You should
![Apostila pl sql oracle portugues free Apostila pl sql oracle portugues free](https://docs.microsoft.com/en-us/sql/ssms/tutorials/media/connect-query-sql-server/changeconnection.png?view=sql-server-2017)
- create a classic report whose source is a function that returns a query
- that query should look like this:
DBMS_ASSERT
is here to prevent SQL Injection- set 'use generic column names' to 'Yes'
- page item's name is
:P1_TABLE_NAME
(in my example); it should be a text field, submit when press Enter
That's all, I presume.
LittlefootLittlefoot33.6k77 gold badges1717 silver badges3636 bronze badges
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.