collection type parameter [11.2] based on the table in pipeline?
Hello
I have a collection of type "table of ' which is filled iteratively. (he gets the new entries more of a souce)
I need to sort the entries in this type of collection as well as the criteria.
My approach is to use a function table in pipeline which offers individual entries as lines for a "select from table (my_function (the_collection)).
My problem is that I get a compilation error in this query statement:
[Error] PLS-00382 (1209:70): PLS-00382: Dieser Lutherischen hat den falschen type-> expression is of the wrong type
[Error] PLS-00306 (1209:51): PLS-00306: wrong Anzahl oder Typen von illuminated by von call "ma_fonction"-> wrong number or type of arguments
[Error] ORA-00904 (1209:25): PL/SQL: ORA-00904: "my_package." "" ma_fonction "-> is not a valid identifier
but this feature is present in the package body and declared in the package header.
the entries in the collection are declared as record types in the package header
the collection of parameter type is declared as 'IS THE INDEX BY a_table.varchar2_attribute%TYPE my_record_type TABLE.
the package compiled until I added the request.
so my questions are:
1. What is the best way to sort the types of collection (by 2 attributes)?
2. how to pass a parameter of type of collection to a table of pipeliened function?
Good bye
DPT
This approach has proved to work well.
I created a temporary table to collect the data in. At this point, I use the MERGE statement to remove duplicates.
I sort everything in refetching this temporary table data.
Good bye
DPT
Tags: Database
Similar Questions
-
Created the form based on the table - created new line - how to retrieve line editing?
Hello
Sorry for such a stupid question, but being new in APEX, I don't know much about how the end user on a form.
I have created a new form (not in a table), based on a table.
I ran the form and created a new line.
After the line was created, the form comes back ready to create another line (all the values in the fields).
How can I go on the recovery of the line, I added just to make a few changes?
Again, please forgive my ignorance.
Mason
Masong says:
Sorry for such a stupid question, but being new in APEX, I don't know much about how the end user on a form.
Or about how best to use this forum. Always include all the details of your environment and your application when you post a question so that we can provide a solution version - and context, case-specific: How to get the answers from the forum
I have created a new form (not in a table), based on a table.
I ran the form and created a new line.
After the line was created, the form comes back ready to create another line (all the values in the fields).
How can I go on the recovery of the line, I added just to make a few changes?
Ensure that the attribute key back to point in the line process of... The ARP process is defined to return the value of PK of records inserted in the element of key primary page and delete any Reset Page clearly session state process created by the wizard page.
-
based on the table line oaf page filter lines
Hello
Right now, I have the search page where the results are displayed in the region of the table.
In addition, I have situation where I need to filter the lines and display the results in the background region based when you click on the row of table area...
How can I achieve this?
Please let me know.
Thank you
MK
Managed to get this working?
-
Check boxes based on the table...
I have an 'event' of the table, a "subject" of table and one table that links these two 'event_topics '. I have a form to create events and want to have all the available topics in the table of 'event' presented a list with checkboxes, to verify for each event, all the van when registering for any subject verified and relevant topics, a line is added in "event_topics" with the event_id and the topic_id.
Is this possible? And if so, how do I start on this? I use Apex 3.2.Hello Tom,
Yes, it is possible.
First of all, you need a point of the box. The LOV for this element of the value to something like
select topic_name, topic_id from topic order by topic_id
To save the selection you need a process of pl/sql
declare vPICKED apex_application_global.vc_arr2; vITEMS varchar2(1000); vCOUNT number; begin vITEMS := :YOUR_CHECKBOX_ITEM; --first delete all entries from event_topics that are not checked delete from event_topics where ':' || trim(to_char(topic_id)) || ':' not in (':' || vITEMS || ':') and event_id = :EVENT_ID; -- insert all new checked topics into event_topics vPICKED := apex_util.string_to_table(vITEMS, ':'); for z IN 1..vPICKED.count loop select count(*) into vCOUNT from event_topics where event_id = :EVENT_ID and topic_id = vPICKED(z); if vCOUNT = 0 then insert into event_topics values (:EVENT_ID, vPICKED(z)); end if; end loop; end;
To extract the items all turned on during the loading of the page, you need to load on before the process of the header:
declare vPICKED apex_application_global.vc_arr2; begin select to_char(topicl_id) bulk collect into vPICKED from event_topics where event_id = :EVENT_ID order by topic_id; :YOUR_CHECKBOX_ITEM := apex_util.table_to_string(vPICKED, ':'); end;
Hope this helps,
Dirk -
Data type can be same base on the table source for blank column
We have an employee as mentioned structure table.
EMPNO NUMBER 4,
ENAME VARCHAR2 (10),
USE VARCHAR2 (9).
MGR NUMBER 4,
HIREDATE DATE,
SAL NUMBER (7.2).
NUMBER (7.2), COMM.
DEPTNO NUMBER (2)
I want to create a basic view on the length of data type of same/exact structure. So is it possible that when the view was created, we can define a data type.
In fact, I need to create a view based on above structure but want get deptno and sum of the salary of emp table column, and the rest of the column will be blank.
Thank youYou can use CAST
create or replace view vu1 as select cast(null as VARCHAR2(10) ) as ENAME, ....
-
The default view sysdate to a form based on the table element
Hello
How to display the current sysdate to a default element value...
In my scenario, I have transaction date not I have no need to have a date for she picker...
I do display the element, and then how to display the date current system, and it needs to be changed dynamically on the basis of the day...
Kind regards
Vincent
Edit the item page and and the default configuration of sysdate value text field
and the type of default value expression plsql
Leave.
-
performance of the duties based on the table
Hello
I have the package with multiple functions inside, each function represents the specific verification, some or all of the controls are executed on a data set.
New controls are implemented, they are added to the main proceedings, that's good but editing master procedure source is the disadvantage.
What I want is to move controls run logic from graphical user interface that allows the operator disable or enable the specific check without having to edit the source.
My first idea of a table with the function names and check toggle the flag (available from the GUI) and master procedure with prepared loop only on the controls enabled.
Secondly, one was call to main table inside each check to find is it enabled or not.
Anyone have an idea better?
Hi GregV,
Audits are functions inside the package each company represents the rule, they are run on each change committed by the user. If all controls are passed the change is allowed.
Now, there is a change - there are several groups changing dynamically the users who should be cheeks just against little business rules.
We must allow privileged user (Administrator of the Group) assign users to groups and chose the active business rules for them.
I'm not a big fan of dynamic sql (first idea), so
1. I want to create tables that define active rules for groups and user group mapping
2. change each control function of the first table of query groups and to determine who is special rule should be enforced against this group.
3. create a gui for admin group to manage groups and assign users.
If it is even a good idea?
See you soon
[UPDATE]
I chose this way
-
update status main table based on the table of detail
Hello
using Jdev11.3
I have the following problem:
table main ServiceCall with attr (id, createdBy, status), or by status (running, closed)
table ServiceCallDetails of detail with attr (id, serviceCallId, Statuc) who are status (running, closed)
the requirment is to update the status in Master table to be closed if and only if all the Status in detail are closed.
I try to achieve this by implementation method in EntityImpl to get accessor lines but I can't.
any help
ThankxYou can try to use something like this:
RowSetIterator it = getViewObject () .createRowSetIterator (null);
IT. Reset();
While (it.hasNext ()) {}
your logic
}
it.closeRowSetIterator) -
Change the type of region based on the value of the element
Hi all
Is it possible to change a type of model of a region based on the value of the page element?
For example, if I have a template type for the area has as the type of model and the region to hide/show for area B as hide/show as well.
I want that type of region B model will be replaced by a type of custom template based on the value of an element in A region.
Is this possible?
Enjoy your entries.
Thank you!Spriya wrote:
Hi all
Is it possible to change a type of model of a region based on the value of the page element?
For example, if I have a template type for the area has as the type of model and the region to hide/show for area B as hide/show as well.I want that type of region B model will be replaced by a type of custom template based on the value of an element in A region.
Is this possible?N ° you either need to have 2 instances of region B, based on different models and make one of them conditionally based on the value of the area A; or to develop a unique model with a structure that is flexible enough to be used in both cases and change its appearance and behavior, for example, Exchange classes in dynamic Action.
-
Try to get the input parameter of a web service Yanick based on the value of the table
Hello-
I am new to ADF and Jdev 11 g (I'm a developer of forms). I had created a web service from a db stored pl/sql package. I can run a function with a parameter of the ADF faces.
Instead of the input being entrable user parameter, I want to be based on a selected value of ADF table column. How to correlate the value of the selected row in the column as an input function parameter?
I played with an ADF output text based on the table column ADF PartialTriggers the value set for the ADF... table that updates the output text based on the selected column. Can I use some kind of partial trigger on the input parameter?
From a point of view of forms, I am looking for ownership of "Copy Item value" :)Two options:
Declarative in tab link, as shown here:
http://blogs.Oracle.com/Shay/2009/07/java_class_data_control_and_ad.html
(its a method POJO but should be the same for a Web Service invoke).Or via code in your backing bean:
http://blogs.Oracle.com/Shay/2009/06/setting_parameter_value_for_bi.html -
How to dynamically change values lov to an article based on the button
Hello
How to dynamically change the value list of an article based on the button create and apply the changes
I have the column type of transaction that lov with values as inward, BACK inward outward, outward in the form based on the table...
in design mode
I need list to the OUTSIDE inward, in the type of transaction oly column...
in update mode
I need the list of BACK inward, BACK outwards in the type of transaction oly column...
Kind regards
Pavan
Maybe something like that for a dynamic LOV
select label d, label r from select 'inward' label , 'create' chk from dual union all select 'outward' , 'create' from dual union all select 'inward return' , 'update' from dual union all select 'outward return', 'update' from dual ) where (:P1_ID is null and chk = 'create') or (:P1_ID is not null and chk = 'update')
-
I understand that to create a collection type to define, and then to declare the variable. Definition of a collection type can be done using 'declare the type' and 'create the type' statement.
What is the difference between these two?
Thanks in advance.Hello
declare the type-online PL/SQL
create type-Online SQL
A simple search on this forum and http://asktom.oracle.com will give you many examples about when to create a type SQL or when you can use PL/SQL.
-
Title of the report based on the value of the Table column
Hello
We use OBIEE 10 g.
We have a Table and a chart based on the table in a report.
Assume that the table has two columns, ID and NAME
can we refer dynamically the value of the column NAME in the title of the report?
for example
the table has
ID | NAME
-------------
123 | GS
now, we would like the title to appear as
Report for the GS
where GS is dynamicUse the narrative mode and refer to the column that you want to display using @2 and place it instead of view title.
Thank you
Isabelle RenonPublished by: Rajesh Raoul - BI on May 2, 2013 05:59
-
How update the column in the table based on the value selected in apex4.1
Hi all
I have the following tables,
and it has the values as follows,leave_type table,it has the following fields, 1.emp_name, 2.sick 3.casual
leave_master table and it includes the following fieldsemp_name sick casual guru 10 10 mishra 10 10
I have the form based on the table "leave_master"1.emp_name, 2.leave_type 3.no_of_days
Here, the leave_type has the LOV which includes.
sick and casual.
When the form is filled out and clicked on the button submit,
I need to update the column leave_type in table leave_type,
for example,.
then I want to update the leave_type column,if emp_name:guru leave_type:sick no_of_days:3
sick sick = - no_of_days for the 'guru' of name
That is to say, ill = 10-3 = 7
then the leave_type of the table must be,
someone can such me what code or method I can use?emp_name sick casual guru 7 10 mishra 10 10
Thank you.
Published by: Gurujothi on May 24, 2012 21:54
Published by: Gurujothi on May 24, 2012 21:54Try something like this...
BEGIN
IF: PXX_LEAVE_TYPE = "Sick" THEN
UPDATE LEAVE_TYPE
THE PATIENT VALUE = SICK -: PXX_NO_OF_DAYS
WHERE EMP_NAME =: PXX_EMP_NAME;
ON THE OTHER
UPDATE LEAVE_TYPE
DEFINE CASUAL = CASUAL -: PXX_NO_OF_DAYS
WHERE EMP_NAME =: PXX_EMP_NAME;
END IF;
COMMIT;
END; -
User alert at points outside the table in Extendscript
I have a script that checks a folder for the files contained in a table format image.
I have to be able to warn the user if:
- a folder they choose contain any type of file not included in the table (illegal file type).
- the folder they choose more than one file type included in the table (mixed types of legal files).
or
- the folder they choose contains any type of file, not in the table more one type of file that is in the table (mix of types of illegal & legal files).
Here's the code that checks through a folder for certain types of files.
var DARKfileList = [], FILE_TYPE, FTlen, i, SEARCH_MASK; FILE_TYPE = ["orf", "tif", "tiff", "jpg", "jpeg"]; FTlen = FILE_TYPE.length; for (i = 0; i < FTlen; i++) { SEARCH_MASK = "*." + FILE_TYPE[i]; DARKfileList = DARKfileList.concat(DARKinputFolder.getFiles(SEARCH_MASK)); } alert('found: ' + DARKfileList.length + ' files');
For now I have sort of reached part 1 but it is messy because it simply checks if
DARKfileList
is empty. Can I use this to alert the user that the file that they choose in a vacuum, but I would much prefer another search for "types of illegal files" it's checking the empty list:if (DARKfileList.length == 0) { alert('Folder does not contain allowed file types!','DARK FRAME folder error'); }
Kind regards..
It's weird, it was not the subfolder thing this morning, when I tried, but I added a few lines to make sure that the files are only of the parent folder.
#target photoshop var fileTypes = ['TIF', 'TIFF', 'JPG', 'JPEG','PSD','RAF'];//keep uppercase var allFiles = new Array() var fileList = new Array(); var legalTypes = new Array(); var illegalTypes = new Array(); var folderToUse = Folder.selectDialog ('Select a folder'); var searchMask = '*.???*' allFiles = folderToUse.getFiles(searchMask); for(var i = 0;i
1&& illegalTypes.length ==0){alert('More than one legal file types.\nNo illegal file types.')} if(legalTypes.length==1&& illegalTypes.length > 0){alert('only one legal file type.\nContains illegal file types.')} if(legalTypes.length>1&& illegalTypes.length > 0){alert('More than one legal file type.\nContains illegal file types.')} if(legalTypes.length==0 && illegalTypes.length > 0){alert('No legal file types.\nContains illegal file types.')} function checkFiles(fileArray){ if(fileArray.length>0){ for(var i =0;i
Maybe you are looking for
-
My imessage and facetime will not work correctly
A few days ago my iMessage suddenly wasn't working properly on my mac. I could not receive messages, and when I tried to sent messages, he says not delivered. Then I reinstalled the OS X IS captain. Then when I type a contact to send an iMessage from
-
Example: Pavilion 65XXHP q: HP Stream Mini Desktop - 010-200 must be recovered
This is my situation. I tried to increase the size of my windows partition by deleting the recovery partition. This I did because I wanted enough space on the partition of upgrade to Windows 10. (I should just wait until I bought a disc of 128 GB m2)
-
Motorcycle G screen becomes black and white, the names of the app
Hello my motorcycle g screen becomes black and freezes, and also most of the time like every day my phone will be white all app names is there a way to get rid of this problem?
-
redirects of CCleaner, no left space and do not know what programs remove
When I try to go to ccleaner, it redirects me to piriform for download is it safe? I have no disc PC let and on c drive it is all the updates of windows and adobe etc and I don't know which ones to remove. Help me please.
-
Why paint Pixelation my picture every time that I open it?
Whenever I have use paint, it will be Pixelize my photo. If I make changes to my image and save it so the next time I open it with of painting the parts of the worst pixelated image every time. I use Windows XP - don't know if it matters, I'm just us