Using Multi Select List in SQL Query
Hi all,
I am trying to using a Multi Select list for filtering of a report. I have :P2_RISK_SEVERITY which has has the possibility of values Very Low:Low:Medium:High:Very High. How do I use this Multi Select in the where section of a SQL query?
I need to say something along the lines of:
Select RISK_SEVERITY from TBL_RMD_RISKS where RISK_SEVERITY = (one of the options selected in the multi select)
Thanks for the help.
Hi there,
The above suggestion will work perfectly as long as the table you're querying is relatively small, but keep in mind that applying the INSTR to the left side of the WHERE clause will always result in a full table scan. This means that if your table is large and RISK_SEVERITY is indexed, the index will never be used. Here is another approach (credit to AskTom) that converts your colon-delimited string of selected values to a list that can be used in an "IN(...)" clause, which will use an index on RISK_SEVERITY as long as the optimizer otherwise deems it appropriate:
-- creates a type to hold a list of varchars
CREATE OR REPLACE TYPE vc2_list_type as table of varchar2(4000);
-- converts a colon-delimited string of values to a list of varchars
CREATE OR REPLACE FUNCTION vc2_list(p_string in varchar2)
return vc2_list_type is
l_string long default p_string || ':';
l_data vc2_list_type := vc2_list_type();
n pls_integer;
begin
loop
exit when l_string is null;
n := instr(l_string, ':');
l_data.extend;
l_data(l_data.count) := ltrim(rtrim(substr(l_string, 1, n - 1)));
l_string := substr(l_string, n + 1);
end loop;
return l_data;
end vc2_list;
-- your WHERE clause
where risk_severity in(
select *
from the(select cast(vc2_list(:P2_RISK_SEVERITY) as vc2_list_type)
from dual))
...Hope this helps,
John
Similar Messages
-
Setting current values in Multiple Select List in SQL Query based Report
Hi,
I have a report based on a sql query that contains a multiple select list. Unfortunately I cannot get the multiple select list to display the current values (p_value) correctly. I have created a page item, :p311_current_versions, that is set using a pre-header process and it returns a value with a colon delimited format e.g. '10.1.2.1.0:10.1.2.2.0'. Then this item is used in the sql query to set the current value (p_value) of the apex_item.select_list_from_query function. However when the table is displayed, instead of having two entries, 10.1.2.1.0 and 10.1.2.2.0 selected, it has an extra entry '10.1.2.1.0:10.1.2.2.0' selected.
Here is my code:
select distinct a.product, a.version from (
select distinct
apex_item.display_and_save(2,product)||apex_item.hidden(1,env_product_id) PRODUCT,
APEX_ITEM.SELECT_LIST_FROM_QUERY(3,decode(product, 'HTTP Server' , :p311_current_versions, version), 'SELECT distinct version d, version r FROM ebs_tech_stack where
product ='''||PRODUCT||'''',
decode(PRODUCT, 'HTTP Server' ,'multiple="multiple" style="width:170px"','style="width:170px"'),
'NO') as version
from ebs_environment_tech_stack
where environment_id = :p311_umgebung_id) a order by a.product
If anyone can help me figure out how to set the current values correctly I'd be really grateful!!
Thanks in advance,
JeanJean,
I don't think this is possible using the apex_item package. The select_list_from_query function accepts only a single value for the second parameter.
Scott -
How to use multi select in a query report
I defined a lov. This lov retuns name and a id. I want to use the result of this multi select in my query.
I always get invalid number when I choose two items of the select. When I debug I see that the return value of the multi select is 1:2. How can I change the seperator : in , I tried the following but this does't work.
if :P26_PRODUCTTYPE IS NOT NULL then
l_sql := l_sql ||' and producttype in
(REPLACE(:p26_producttype,'':'','','' ))';
end if;as you're finding, multiple values selected from html db multi-select list items (and checkboxes) are stored as a single, colon-delimited string. i explained an easy way to handle this via pl/sql in...
Multiple select list
...that post shows you how to throw the selected values into a pl/sql table and step through them as needed. it also showed how to use an instr to parse through the string if you want to go that route. you could use that same instr logic right in your sql query. so let's say your lov for your multi-select item (P1_MY_MULTISELECT, we'll call it) was defined as...
select ename, empno from emp order by 1
...and your user selected KING, FORD, and JONES. :P1_MY_MULTISELECT would store those values as...
7839:7902:7566
...you could then write a query to return the selected enames with something like...
select ename, job
from emp
where insrt (':'||:P1_MY_MULTISELECT||':',':'||empno||':') != 0
...hope this helps,
raj -
Hope someone can help. I have tried to find the best way to do this and can't seem to make sense of anything. I'm using an Access 2013 Database and I have a report that is based on a query. I've created a Report Criteria Form. I
need the user to be able to select multiple items in a list box and also to enter a Begin Date and End Date. I then need my report to return only the records that meet all selected criteria. It works fine with a ComboBox and 1 selection but can't
get it to work with a List Box so they can select multiple items. Any help is greatly appreciated while I still have hair left.The query should return all records.
Let's say you have the following controls on your report criteria form:
txtStart: text box, formatted as a date.
txtEnd: text box, formatted as a date.
lbxMulti: multi-select list box.
cmdOpenReport: command button used to open the report.
The text boxes are used to filter the date/time field DateField, and the list box to filter the number field SomeField.
The report to be opened is rptReport.
The On Click event procedure for the command button could look like this:
Private Sub cmdOpenReport_Click()
Dim strWhere As String
Dim strIn As String
Dim varItm As Variant
On Error GoTo ErrHandler
If Not IsNull(Me.txtStart) Then
strWhere = strWhere & " AND [DateField]>=#" & Format(Me.txtStart, "yyyy-mm-dd") & "#"
End If
If Not IsNull(Me.txtEnd) Then
strWhere = strWhere & " AND [DateField]<=#" & Format(Me.txtEnd, "yyyy-mm-dd") & "#"
End If
For Each varItm In Me.lbxMulti.ItemsSelected
strIn = strIn & "," & Me.lbxMulti.ItemData(varItm)
Next varItm
If strIn <> "" Then
' Remove initial comma
strIn = Mid(strIn, 2)
strWhere = strWhere & " AND [SomeField] In (" & strWhere & ")"
End If
If strWhere <> "" Then
' Remove initial " AND "
strWhere = Mid(strWhere, 6)
End If
DoCmd.OpenReport ReportName:="rptMyReport", View:=acViewPreview, WhereCondition:=strWhere
Exit Sub
ErrHandler:
If Err = 2501 Then
' Report cancelled - ignore
Else
MsgBox Err.Description, vbExclamation
End If
End Sub
If SomeField is a text field instead of a number field, change the line
strIn = strIn & "," & Me.lbxMulti.ItemData(varItm)
to
strIn = strIn & "," & Chr(34) & Me.lbxMulti.ItemData(varItm) & Chr(34)
Regards, Hans Vogelaar (http://www.eileenslounge.com) -
Select multiple values in mult-select list
I have the following query as the source for a multi-select page item:
SELECT person.person_id
FROM person, pers_proj_task
WHERE pers_proj_task.person_id = person.person_id
AND pers_proj_task.project_id = :P3_PROJECT_ID
The query returns two records and the page item's session value is 4:3, but only the value 4 is highlighted in the mulit-select list. How can I get both values to be highlighted?Got it to work for a multi-select item by following Dimitri's post which uses a shuttle example. It was still only highlighting one value, but I tried Patrick Wolf's suggestion from the comments on Dimitri's post to put the pl/sql block in the source of the item rather than as a computation and it worked.
So I now have a multi-select list which has default values pulled from a LOV. The items that are highlighted by default are selected by using the following pl/sql block in the "source/value or expression" of the :P3_PERSON_ID multi-select item:
declare
person_list apex_application_global.vc_arr2;
i number := 1;
begin
for r in ( SELECT person.person_id
FROM person, pers_proj_task
WHERE pers_proj_task.person_id = person.person_id
AND pers_proj_task.project_id = :P3_PROJECT_ID)
loop
person_list(i) := r.person_id;
i := i + 1;
end loop;
return APEX_UTIL.TABLE_TO_STRING(person_list,':');
end;
Thanks to Amanda, ArtS, Dimitri and Patrick.
Jeremy -
Multi-select list to select with in clause
I have a multi-select list that the user can select from. P200_NODE_SELECTION.
I take the value(s) of that list and parse them out in a process using this code:
declare
l_selected HTMLDB_APPLICATION_GLOBAL.VC_ARR2;
v_char varchar2(2000);
begin
l_selected:=HTMLDB_UTIL.STRING_TO_TABLE(to_char(:P200_NODE_SELECTION) );
for i in 1..l_selected.count
loop
if i=1
then
:P200_LIST_OF_NODES:=to_char(l_selected(i) );
else
:P200_LIST_OF_NODES:=to_char(:P200_LIST_OF_NODES)||','||to_char(l_selected(i) );
end if;
end loop;
end;
This PL/SQL is trying to create the in-list string to be used in as the LOV to populate another select list. The LOV query for the second multi-select list looks like this:
select instance_name DISP, instance_id RET
from instance
where to_char(node_id) in (:P200_LIST_OF_NODES)
I've tried this a couple of different ways. Without the to_char in the where clause (a terrible thing to do to a query I know) I get a numeric conversion error.
When I do it with the to_char, it works if I select one record in the multi-select list, but if there are more than one then the in list fails.
I'm sure there must be a better way to do this (or at least a way that works!).... anyone want to help me here?Robert - Try where instr(','||:P200_LIST_OF_NODES||',',','||to_char(node_id)||',') > 0...and do get rid of all those to_chars in the process.
Scott -
Implementing multi-select lists in Oracle Forms
Can anyone of you please tell me how to do multi select list in forms. I used picklist.fmb from oracle demo forms but it is not working fine. If someone could provide a working form I will be grateful to them.
My mail id is [email protected]Some years ago I wrote (using Forms6i) utility MSLOV for such purposes, and even wrote an article about using it, but, of course, in Russian :-)
I successfully use it in my Web Forms6i project and also test it in C-S Forms6i and Forms9i.
If someone interesting, I also have short english usage description.
It will be nice to hear your comments.
At first, you need a code, which can be downloaded from http://www.geocities.com/luzanovp/mslov.html
At the end of article there is a link to mslov.zip. Get it.
Compile MSLOV.fmb and MSLOV.pll
Run demo forms: EMP_DEMO.fmb, ORD_DEMO.fmb and see how it works.
It requires Scott's tables: emp, dept, ord, item, product. You can create these tables from demobld.sql
Below description about how to use it.
You can show to user only one column, actually it can be expression (so, you
are not limited here to one database column only ).
Specify this column/expression by label_in parameter to fp_mslov.show_lov
For example, if EMP table contains first_name and last_name columns and
you want to show to the user full name do this:
IF fp_mslov.show_lov (
label_in => 'first_name || '' '' || last_name',
Parameter id_in - this is what will be returned to you as a developer after user
made his choice.
For example, you want to receive array of EMPNO:
IF fp_mslov.show_lov (
label_in => 'first_name || '' '' || last_name',
id_in => 'empno'
In some cases you need to return more that one column.
You can specify up to five additional columns for such purposes.
For example, you want to return not only EMPNO, but also SAL and COMM columns:
IF fp_mslov.show_lov (
label_in => 'first_name || '' '' || last_name',
id_in => 'empno',
col1_in => 'sal',
col2_in => 'comm'
Also, you can use expressions in place of these columns:
col3_in => 'sal + NVL(comm, 0)'
From which table we must query?
How to order by or specify some conditions(Where clause)?
Where the place for GROUP BY?
For all these questions you must use from_clause_in parameter.
In our example we will query emp table and want order by salary in descending
order:
IF fp_mslov.show_lov (
from_clause_in => 'FROM emp ORDER BY sal DESC',
Parameter title_in to fp_mslov.show_lov is a self documented.
This is a title for MSLOV dialog.
So, to invoke mslov utility, we construct such call:
IF fp_mslov.show_lov (
label_in => 'first_name || '' '' || last_name',
id_in => 'empno',
col1_in => 'sal',
col2_in => 'comm'
col3_in => 'sal + NVL(comm, 0)',
from_clause_in => 'FROM emp ORDER BY sal DESC',
title_in => 'Select employees'
THEN
This function fp_mslov.show_lov will return TRUE if user made selection and
FALSE if user press CANCEL (similar to SHOW_LOV builtin).
Now, if it return TRUE we need to process returned rows (selected by user).
I store it in global record group.
But to work with this record group, you can use fp_mslov package, which
provide desired API for this purpose.
At first, you need to declare a variable of FP_MSLOV.OUT_RECORD_TYPE type.
Actually this is a record type declared in fp_mslov package specification.
DECLARE
returned_rec FP_MSLOV.OUT_RECORD_TYPE;
To process selected rows we need a loop from 1 to a number of selected rows.
Such number can be received by fp_mslov.rowcount function:
FOR i IN 1 .. fp_mslov.rowcount
LOOP
END LOOP;
To return one row we can use fp_mslov.get_row function.
FOR i IN 1 .. fp_mslov.rowcount
LOOP
returned_rec := fp_mslov.get_row(i);
END LOOP;
Now, you can do what you want with returned row.
RETURNED_REC record has the following fields which correspond to parameters of
the
fp_mslov.show_lov function: id, col1, col2, col3, col4, col5
You know that in id field will be empno column, in col1 -> sal, etc
So, you can process them:
FOR i IN 1 .. fp_mslov.rowcount
LOOP
returned_rec := fp_mslov.get_row(i);
message('Empno: ' || returned_rec.id);
message('Sal: ' || returned_rec.col1);
message('Comm: ' || returned_rec.col2);
message('Sal+Comm: ' || returned_rec.col3);
END LOOP;
Remember that returned values always are varchar2 values.
So if you need, for example, a date you need explicitly convert it to char when
invoking
fp_mslov.show_lov and then (after fp_mslov.get_row) convert it to date with the
same format mask.
For example:
IF fp_mslov.show_lov (
col4_in => 'TO_CHAR(hiredate, ''DD.MM.YYYY HH24:MI:SS'')',
... TO_DATE(returned_rec.col4, 'DD.MM.YYYY HH24:MI:SS');
To clear memory structures which used by global record group and others
variables,
you need to use fp_mslov.clear procedure.
And now all together:
DECLARE
returned_rec FP_MSLOV.OUT_RECORD_TYPE;
BEGIN
IF fp_mslov.show_lov (
label_in => 'first_name || '' '' || last_name',
id_in => 'empno',
col1_in => 'sal',
col2_in => 'comm'
col3_in => 'sal + NVL(comm, 0)',
from_clause_in => 'FROM emp ORDER BY sal DESC',
title_in => 'Select employees'
THEN
FOR i IN 1 .. fp_mslov.rowcount
LOOP
returned_rec := fp_mslov.get_row(i);
message('Empno: ' || returned_rec.id);
message('Sal: ' || returned_rec.col1);
message('Comm: ' || returned_rec.col2);
message('Sal+Comm: ' || returned_rec.col3);
END LOOP;
ELSE
NULL; -- User press Cancel
END IF;
fp_mslov.clear;
END; -
Set Default Value of Multi-select list item
I have a multi-select list item I want to default the value of to '%' (which is really '%null%') and have it selected. I tried setting default value of item, but it doesn't take '%null%'. I also tried a computation with a static of
:P507_ITEM := '%null%'; How do you get the default value set and selected?Hi
Shijesh is right, you need to change your null return value and use that return value as your default. Try and use something of the same datatype as your real return values if you plan to use '%' to display all as it will make your queries simpler. eg.
Company A returns 1
Company B return 2
% returns 0
Then your query would be...
SELECT ...
FROM ...
WHERE company_id = DECODE(:P_COMPANY,1,1,2,2,0,company_id)
Hope this makes sense.
Cheers
Ben -
Bug while saving multi select list
Hi,
My requirement is to construct a region where user can select their answer from available option. answer field can be multiple select/single select or text area.
I have written below query to achieve different type of answer field.
/**query****/
DECLARE
v_sql VARCHAR2 (32767);
v_answer VARCHAR2 (32767);
v_main_sql VARCHAR2 (32767);
BEGIN
FOR cur IN (SELECT question_id, question, answer_type, available_answer FROM question WHERE status= 'ACTV')
LOOP
v_sql := 'SELECT ';
v_sql := v_sql || ' APEX_ITEM.hidden(4,question_id)||question question, '; /*do not show question id as per requirement*/
IF cur.answer_type = 'MS' -- Multi Select List
THEN
v_answer := cur.available_answer;
v_sql :=
v_sql
|| ' APEX_ITEM.SELECT_LIST_FROM_QUERY(3,null,''SELECT * from table(
AU_F_LOV_FN('''''
|| v_answer
|| '''''))'',''class="multiselect" multiple="multiple"'',''NO'') Answer ';
ELSIF cur.answer_type = 'SS'
THEN -- Single Select List
v_answer := cur.available_answer;
v_sql :=
v_sql
|| ' APEX_ITEM.SELECT_LIST_FROM_QUERY(3,null,''SELECT * from table(
AU_F_LOV_FN('''''
|| v_answer
|| '''''))'') Answer ';
ELSE -- Free text
v_sql := v_sql || ' apex_item.textarea(3,available_answer,2,20) Answer ';
END IF;
v_sql := v_sql || ' from question ';
v_sql := v_sql || ' where question_id=' || cur.question_id;
IF v_main_sql IS NULL THEN
v_main_sql := v_sql;
ELSE
v_main_sql := v_main_sql ||' UNION ' || v_sql;
END IF;
END LOOP;
RETURN v_main_sql;
END;
/***end of query***/
If I select two options from multiple select list it is saving two records into table instead of saving one record with colon delimeter.
/**query to save**/
FOR i IN 1 .. APEX_APPLICATION.G_F03.COUNT
LOOP
IF APEX_APPLICATION.G_F03(i) IS NOT NULL THEN
UPDATE question_answer
SET answer = v_answer
WHERE question_id = APEX_APPLICATION.G_F04(i)
and call_id=p_sourceid;
IF sql%rowcount =0 then
INSERT INTO question_answer (question_id,
answer,
call_id,
status,
customer_id)
VALUES (APEX_APPLICATION.G_F04(i),
nvl(v_answer,APEX_APPLICATION.G_F03(i)),
p_sourceid,
'ACTV',
p_customer_id);
END if;
END IF;
END LOOP;
/**End**/
Can anyone please help me? Why is it happening? How to tweak my query so that it saves one record with colon delimeter.Technically, my understanding is that a Shuttle is just two multiselect lists where javascript moves the items from one to the other. Technically its the same thing, just different presentation and methods for selection. When you go to process, its seen the same way as you initially had your code setup so no code changes would have been necessary. As it's a built in item type and with APEX's backwards compatibility policies, if your code works now it should continue to work.
-
Populate multi select list in on demand application process
Hi all,
To populate a multi select list we use this code:
DECLARE
l_counter number;
l_o_name varchar2(2000);
l_val varchar2(100);
BEGIN
l_val := wwv_flow.g_x01;
owa_util.mime_header('text/xml', FALSE );
htp.p('Cache-Control: no-cache');
htp.p('Pragma: no-cache');
owa_util.http_header_close;
htp.prn('<select>');
FOR rec IN (
SELECT DISTINCT DECODE(districtscode,NULL,'- Onbekend -',districtscode) as "NAME"
, DECODE(districtscode,NULL,'-2',districtscode)as "ID"
FROM table
WHERE (UPPER(dienstcode) =(l_val)
or l_val = '-1')
and objectsubcategorie_id in (select objectsubcategorie_id from table where ind_actief = 'J')
and ind_uitgesloten is null
UNION
SELECT '- Alle districten -', '-1'
FROM DUAL
ORDER BY 1
LOOP
htp.prn('<option value="' || rec.ID || '">' || rec.NAME
|| '</option>');
END LOOP;
htp.prn('</select>');
END;
However: L_val is determined by a multiselect list. So, L_id can be: 'A:B:C'. I can convert the value of l_id to 'A','B','C' (with eg replace function). However in a where clause one cannot say: WHERE UPPER(dienstcode) in l_val. So I created a refcursor which I put in a pl/qsl table. Then I looped through the pl/sql table.
Somehow this did not have the same results. Eventhough the refcursor gave back the same data which I tested by logging the values of the pl/sql table just before the htp.prn command, the htp.prn did not return the values.
Does anyone know why this happens? Is there a difference between the for loop in this code and looping through a self defined pl/sql table?
Thanks in advance
MauricePlease, anybody could help me with this?
Thank you! -
Use realational operators in an SQL query??????
does any one knows how to use realational operators in an SQL query??????
i wud like to do something like
select decode(2<3,sysdate,sydate +1) from dual
but i know decode does not supports relational operators......
thanx and Regards
amytYou can use a CASE statement which does support relational operators, or if you must use DECODE, then you can use something like:
SELECT DECODE(SIGN(2 - 3),-1,sysdate,sysdate - 1)
FROM dual;The SIGN function returns -1 if the expression is < 0, 1 if the expression is > 0 and 0 if the expression is 0. This works for numeric comparisions. You can use the GREATEST or LEAST functions in a similar fashion for character comparisions.
TTFN
John -
Using multiple select lists in ADF
Hi,
I am trying to use a multiple select list in my JSP page, and have a method in the ApplicationModule be called when the Struts action is called. I am following the example ADF tutorials, where the method is added to the ApplicationModule class, then dragged onto the Stuts Flow diagram (to associate it with an action).
I am able to create a dyna form bean for the page that contains the multi select as a type "java.lang.String[]" (string array). I am able get that values that were selected in a normal action's "execute" method. For example:
msf = (DynaActionForm) form;
String[] statusSelection = (String[]) msf.get("multSelectList");
However, I cannot seem to get the "multSelectList" values into a method in my Application Module class. The "multSelectList" is defined in my dynaFormBean as a String[] type. I am passing it in as an argument like the following....
public void setParams(String multSelectList[]) {
This results in the method not being called at all. I am not sure why. Does this have something to do with a String[] not being serializable??
However, if I just attempt to pass other types form items to the method, it works. For example:
public void setParams(String simpleCheckbox) {
Does anyone know how to use multiple select lists in conjunction with ADF?
P.S.
my multSelectList looks something like this:
<select name="multSelectList" multiple size="5">
<option value="ALL">Select All</option>
<option value="preferred">Preferred</option>
<option value="standard">Standard</option>
<option value="approved">Approved</option>
<option value="interim">Interim</option>
</select>I got this working by changing the signature of the Application Module method to use ArrayList rather than String[], then you can marshal the Struts FormBean contents into an ArrayList to pass up.
To do this, subclass the DataAction by using "Go To Code" off of the context menu and then override the initializeMethodParameters() method:
protected void initializeMethodParameters(DataActionContext actionContext, JUCtrlActionBinding actionBinding)
//Get the String Array from the Form Bean
String[] selection = (String[])((DynaActionForm)actionContext.getActionForm()).get("multiSelect");
//convert that to an ArrayList
ArrayList selectionArr = new ArrayList( Arrays.asList(selection));
//Add that object to the Arg List for the AM method
ArrayList params = new ArrayList();
params.add(selectionArr);
actionBinding.setParams(params);
} -
How to Use the Procedures in a Sql Query
Hi Friends,
Can anyone help me out whether can we use the procedure in the sql query..
if yes help me out with an example
my requirement is
i have one sql query .. in which i need to use the procedure which returns multiple values... how can i overcome it,can anyone help me out for this..
for your reference i am pasting the sql query
SELECT paf.person_id
FROM per_all_assignments_f paf START WITH paf.person_id = p_person_id
AND paf.primary_flag = 'Y'
AND paf.assignment_type IN('E', 'C')
AND l_effective_date BETWEEN paf.effective_start_date
AND paf.effective_end_date
CONNECT BY PRIOR paf.supervisor_id = paf.person_id
AND paf.primary_flag = 'Y'
AND paf.assignment_type IN('E', 'C')
AND l_effective_date BETWEEN paf.effective_start_date
AND paf.effective_end_date
and paf.person_id not in (>>>I HAVE TO USE THE PROCEDURE HERE<<<<);
Thanks in advanceWe never saw your procedure, but maybe you could wrap it in a function
SQL> create or replace procedure get_members(in_something IN number, out_members OUT sys_refcursor)
is
begin
open out_members for
'select level member_id from dual connect by level <= :num' using in_something;
end get_members;
Procedure created.
SQL> create or replace type numbers as table of number;
Type created.
SQL> create or replace function members(in_something IN number)
return numbers
as
member_cur sys_refcursor;
members numbers;
begin
get_members(in_something, member_cur);
fetch member_cur bulk collect into members;
close member_cur;
return members;
end;
Function created.
SQL> select * from table(members(4));
COLUMN_VALUE
1
2
3
4
4 rows selected.Variant on same using piplined function
SQL> create or replace function members_piped(in_something IN number)
return numbers pipelined
as
member_cur sys_refcursor;
rec number;
begin
get_members(in_something, member_cur);
loop
fetch member_cur into rec;
exit when member_cur%notfound;
pipe row(rec);
end loop;
close member_cur;
return;
end;
Function created.
SQL> select * from table(members_piped(4));
COLUMN_VALUE
1
2
3
4
4 rows selected.
SQL> drop function members_piped;
Function dropped.
SQL> drop function members;
Function dropped.
SQL> drop type numbers;
Type dropped.
SQL> drop procedure get_members;
Procedure droppedEdit:
Sorry Blu, had not seen you already posted similar thing
Edited by: Peter on Jan 27, 2011 5:38 AM -
Upgrade to 10.1.3.4: Problems with multi-select list
Hi,
We upgraded from BiseSEone (10.1.3.2) to 10.1.3.4 (using BI EE). One of the features we were longing for was the improved multi-select list in the dashboard prompts (with a efficient search support). But after the Installation the multi-select list doesn't work at all. There are no data offered and the frames are missing. What could be go wrong here ? There were no problems during the installation. I told the installation to keep the configurations.
regards
Thomas
Hi guru's,
is there anybody around who experienced a similar phenomenon !!!
regards
Thomas
Edited by: tdombrow10 on Jun 7, 2009 10:04 PMunfortuantely(i beleive i had the same problem)
you have to rebuild them
i hope i helped....
http://greekoraclebi.blogspot.com/
/////////////////////////////////////// -
Using a Select list with Submit
I am trying to use the select list with Submit on my page.
I have 3 select lists.
On the first one,I am showing the list of all jacks.
When the user selects a jack from the first list, I want to show all the jacks except the one which was selected.
When the user selects a jack from the second list, I want to show all the jacks except the ones selected in the first list and the second list.
I have created the select lists with submit and then I have put the query for getting the jacks. I created an unconditional branch. I am also passing the variables so that I can set the values of the items on submit.
I also created a computation as mentioned in one of the OTN discussions, and have mentioned the value of second list to be calculated from the first and 3rd from first and second.
But after clicking the first select list, I am losing all the existing values on the first page. I wonder what I am missing here. Can anyone hellp?
Thanks,
GargiGargi,
In this case using 'select list with redirect' makes more sense rather than with SUBMIT. So change all the select lists to 'select list with redirect' (it redirects to same page inserting 'select list' value session state).
Now for the 2nd select list query add a condition in where clause like
WHERE sl_col != :P1_SL1And for the 3rd select list query add a condition in where clause like
WHERE sl_col NOT IN (:P1_SL1, :P1_SL2)Hope it helps :-)
Cheers,
Hari
Maybe you are looking for
-
Tolerance Limits when doing GR
Hi! I have set the tolerance key B2 and VP in OMC0. However the system ignores these settings at GR. I have to set the tolerances in PO in order for the system to react. This is not desirable in our situation since we are receiving POs from SRM witho
-
Hello, I have query jump from Q1 to Q2. The result in the Q1 is in EUR. when I jump from Q1 to Q2 it is automatically filling Currency filled with USD and key figures are showing NOT APPLICABLE DATA. Once you remove the Currenyc USD then it is showin
-
Chapter Markers missing via Compressor?
Hi y'all, Using the latest FCP Studio, I used the default Compressor setting for DVD best 90 minutes, and my chapter markers did not get exported. Any idea what the problem is, or how to recapture them without re-exporting from FCP? I can't find a wa
-
DB adapter with different db instance
Hi, I need to configure different db instance into the same data base adapter. I've one instance for publisher schema and another one for subscriber schema . In the adapter.ini there are parameters only for OAI (publisher schema) db_bridge_schema1_ho
-
Doc bug: Different 11.1 manuals give different internal JVM version
The [Advanced Application Developers Guide 11g|http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28424/adfns_environments.htm#CHDDDJCA] still indicates it's a 1.4 JVM Oracle JVM, the Java Virtual Machine provided with the Oracle Database, is c