I'd like to customize the name of each Query Result tab to something other than that default name.
I use to execute multiple queires, but each time the the output displayed as QUERY RESULT 1, QUERY RESULT 2 .... so on. Its difficult to identify and verify the matching SQL Query.
so i want to set the QUERY RESULT tab name, so that it displays(Output) the customized name instead of Default Name. E.g (setting to Table_name, search names, key words to identify the parent query triggered) etc.,
You cant rename these tabs via code/SQL, but you can use your mouse.
But you really shouldn't need to.
"Its difficult to identify and verify the matching SQL Query"
If you mouse over the tab, it shows you the SQL/code behind it. You can also click the SQL button to copy the code to the clipboard.
Related
I have data in excel, like below:
and, i have microsoft Word document, like below:
How to mail merge in microsoft word, one to Many row?
I want result like below in microsoft Word:
Thank You Very Much
This can be done, but it's a bit complex. There are a number of possible approaches, outlined at my website.
Since you show the desired result as a table, using a Database field is probably the optimal way to go about it. Insert Database is an old command that's no longer exposed in the Word UI by default. You'll find it in File/Options/Customize Ribbon or Quick Access Toolbar, under All Commands.
The command inserts a field with the name Database, via a set of dialog boxes:
Get Data is the same as what you see in mail merge when selecting the data source. This uses any valid connection method (these days, ODBC or OLE DB - the latter is the default) to bind to the data source. Select the data source containing the "many" information. (Note: the "one" side should be only the unique "one" information; the "many" side should be in a separate data source containing the unique identifier from the "one" side for each item on the "many" side.)
Query options is for setting Query Options (filter/sort what comes in). On the left side of the "equation" you need to select the field that is the identifier in the data source for the one side of one-to-many. On the right side, enter a value you know is in the data so that there's a match.
Table AutoFormat can be used to select a built-in (or user-defined) Table Style.
Insert Data - This is important: activate the checkbox Insert Data as field. This is what will dynamically link the data to the data source and provide a link to the merge information.
OK to insert the data / field.
Press Alt+F9 to view the underlying field codes.
Locate the query information (Select...) near the end of the field code. Change the right side of the Where clause to match the mergefield that provides the "one" side of one-to-many. For example: WHERE ((ID= 1)) would become WHERE ((ID= { Mergefield ID }))
If you don't want to see some of the fields (columns), such as an ID column (the "one" side of one-to-many), edit the list of fields at the beginning of the Select statement.
The result will look something like the following
How do I cause APEX to refresh a chart (graph) after I change the value in a text box/select list/etc that is used as a parameter in the chart's pl/sql statement?
I'd like it to look as professional as possible and minimize the portion of the page that must be refreshed (i.e., "ajax-like", which is the standard in 2018).
Create a dynamic action on the text box/select list/etc that is changed with event "change"
Create a true action and select pl/sql and write
Begin
null;
end;
In page items to submit select your items
Create a second true action after the first and select Refresh. Then select region as affected element and select your chart. Remember that the option 'Fire on initialization' must be set to NO
See Approach B, below, for the optimal solution.
Approach A
The simplest option (that is less professional) is to modify every text box/select list/etc of interest to submit the page when the value of the text box/select list/etc changes. As an example, for the select list, go to its settings->page action on selection and change the setting to submit page.
There are two main downsides to that approach:
Most of the page will refresh, which is jarring to your user, and
If you're using a plugin, or the type of item that you're using doesn't support that approach, then you're out of luck.
Approach B
A more complex solution that yields a more professional result follows. This solution involves dynamic actions, which I will probably not fully explain here. However, the information should be enough for the user to figure it out.
Let us suppose that you have two things: (1) a select list whose value is used as a parameter in a (2) chart's sql source statement.
To get the chart to update every time you make a new choice via the select list, you need to:
Create a dynamic action for the select list of interest. You do this by clicking on the select list, going to the dynamic action tab (the lightning bolt); right-click on the item; click select dynamic action; give it a name and set the event to change and make the selection type an item and set the item to the name of the select list you're watching.
Create a true action for that dynamic action that executes pl/sql code (you can do this by modifying the show action that was created by default in 1.). Set the pl/sql code to null;. Then under items to submit, specify the name of the select list of interest.
Create a second true action that refreshes the region that contains the chart.
You'll need to make sure that the sequence assigned to 2. is a smaller number than the sequence assigned to 3.. This should happen by default, but it's an area you can get tripped up.
Inapplicable Approach C
In Apex 5.something, they added a feature called Cascading List of Values. This feature allows you to specify that one item depends on another item for its values. For example, if you have a select list that allows the user to choose a department, and then you have a second select list that allows you to choose an employee from the chosen department (which presumably obtains its values from a query involving the value chosen in the first select list), you can tell APEX to refresh the second select list whenever you update the first.
You do this by editing the second select list. Under its settings goto list of values->cascading LOV parent item(s). Add the first select list as a "reverse" dependent (aka, "parent"). This will ensure that any time the first select list is updated, the second select list is also updated.
For better or for worse, charts do not have the cascading LOV parent item(s) setting. Thus, this solution does not apply to this question.
As far as I can tell, the search filter in the navigator will only search available database names, not table names.
If you click on a table name and start typing, it appears that a simple search can be performed beginning with the first letter of the tables.
I'm looking for way to be able to search all table names in a selected database. Sometimes there can be a lot of tables to sort through. It seems like a feature that would likely be there and I can't find it.
Found out the answer...
If you type for example *.test_table or the schema name instead of the asterisk it will filter them. The key is that the schema/database must be specified in the search query. The asterisk notation works with the table names as well. For example *.*test* will filter any table in any schema with test anywhere in the table name.
You can use the command
SHOW TABLES like '%%';
To have it always in your tools, you can add it as a snippet to SQL aditions panel on the right.
Then you can always either bring it in your editor and type your search key between %%, or just execute it as it is (It will fetch all the tables of the database) and then just filter using the "filter rows" input of the result set.
I am creating new input control on "Input control details" tab for "Type".
Then i choose Multi-select list of Values and click on button Edit local Resource (List Of Values).
There i have entered values manually.
Is it possible to enter the list values dynamically.
Means i want to display the order numbers in the dropdown list for the list values dynamically from the ORDER table instead of entering them manually
My query is - "SELECT `ORDER_NUM` FROM `ORDER`"
Please suggest. Thanks in advance.
In your "Repository Navigator", create a folder eg "Resources" in this folder create a "Query" for example "Query01". Configure this application with your information.
Always in your "Repository Navigator", create in the "Input controls" local input control file. In the "Input control details" tab, select the type of control and options. For example, "Multi-select List of Values (Check box)." Then "Query Resource" in the tab "Input control details" choose "From the Repositery" select your previously created query.
Then in your report, go to Parameters and create "Query01". In the application of your report, call your "Query01" via the SQL query like this:
WHERE $ X {IN, Your.Table, Query01}
I just understand myself how this works as I struggled to understand at first. Hoping to have quite do the clearing.
I want to bring in all the values in a specific field to populate a parameter. I can do so, but I also want to add the word "..ALL" to the head of the list so the parameter essentially becomes optional.
When I choose a new data source, I don't seem to have the option of entering a SQL statement to pull the values, I can only choose a field to draw values from.
How do I do this?
You don't see the Add Command option right under the datasource name in the database expert? This let's you enter the sql so you can union the hardcoded 'ALL' option.
Or, you could always use a view or stored procedure.