How to pass a list of values to the rear end.

Hello
I have a block with 3 columns, a database column no (checkbox), my goal is to return the rows that are selected by the user to the back-end for some
the treatment. I know not how to loop through the block and assign values to the variable column, if the check box is enabled, but instead to send each line at the rear,
I am looking for a solution by which I can send all end them the selected backward in one trip.
Will I do Array, or the type of table, and go to the rear. What is the best solution.

How to declare the table and the Type of table in Oralce 10g shape

Thanks in advance

Rizly

You can use the following in your stored procedure:

SQL> set serveroutput on
SQL>
SQL> DECLARE
  2    LC$Arg  VARCHAR2(100) := '''file1'' from dual union select ''file2'' from dual union select '
'file3'' from dual' ;
  3    r sys_refcursor;
  4    lc$sql VARCHAR2(1000) := 'select ' || LC$arg ;
  5    v VARCHAR2(100);
  6  BEGIN
  7    OPEN r FOR lc$sql ;
  8    LOOP
  9      FETCH r INTO v ;
 10   EXIT WHEN r%NOTFOUND;
 11   DBMS_OUTPUT.PUT_LINE(v);
 12    END LOOP;
 13    CLOSE r ;
 14  END;
 15
 16  /
file1
file2
file3

François

Tags: Oracle Development

Similar Questions

  • How to connect a list of values to the regions

    Hi all

    I created the list of values like the bar chart, histogram, Pie Chart.these the list of values added to the text box named as a type of cat.

    In the same region, I created 3 chart under regions.

    My requirement is if I select the graph page type-pie chart.the will see the pie only graphic region only. Even at the bar graph and histogram also.

    Please tell me clearly.

    Please help me.

    Thank you and best regards,

    Rambeau

    Amandine says:

    But I have 2 questions.

    1, where we give value to the element of LOV

    I created the list of values like the bar chart, histogram, Pie Chart.these the list of values added to the text box named as a type of cat.

    When you say "text field", do you mean literally a text element? If so, why do you use it? A select list or radio group would generally allow to select the chart type.

    Usually the user "will give the value" (for example, select the desired option). You can provide an option by default when the page is rendered first with a header of computation that runs under certain conditions, if the value of the element is set to zero. (You must use a calculation for this rather than the property item by default so that the value is in session state to operate in conditions of graphic region.)

    2, please give some examples of Expression1.

    Expression 1 is the name of the element used to display the options. Following the convention of the APEX of prefacing names to page elements to make them unique, it will be something like P2_CHART_TYPE.

  • Pass a list of values to a pl/sql function

    I would like to pass a list of values to a pl/sql function where the list will be used in an IN clause. Ideally, I would like to do the following:

    CREATE or REPLACE FUNCTION (dept_list in varchar2)
    Start
    Select... where dept in (dept_list);

    use: process_list ('7730,7735,7740,7745');

    I can't find an example to do based on pl/sql, but it seems feasible.
    Is there a way to do this?

    user12088323 wrote:

    I would like to pass a list of values to a pl/sql function where the list will be used in an IN clause.

    use: process_list ('7730,7735,7740,7745');

    The first thing is that you need an appropriate data type for storing a list of numbers. A unique value that look you like a list of numbers, is not actually a list of numbers but a single character value.

    This example uses the built in odcinumberlist data type in a procedure, you can do the same in function

    Re: Pass an array to an Oracle stored procedure

    If you have an older version of the database, you may need to create your own type with the same definition of odcinumberlist.

  • The list of values in the table of the ADF is not other cela rather single attribute yourself.

    Dear all,

    I have a list of the values on the view object and and created a table by dragging the drop to the page.

    Problem is that LOV is advising no other attributes I mentioned as other attributes in the list of values. only the LOV element becomes selected ID.

    The following table properties

    -------------------------------------

    < af:table value = "#{bindings." XxIncidentRptInjuredPersonsEOView1.collectionModel}.

    var = "row".

    lines = ' #{bindings. " XxIncidentRptInjuredPersonsEOView1.rangeSize}.

    emptyText = "#{bindings." XxIncidentRptInjuredPersonsEOView1.viewable? "{'No data to display.': 'Access Denied.'}".

    fetchSize = "#{bindings." XxIncidentRptInjuredPersonsEOView1.rangeSize}.

    rowBandingInterval = '0 '.

    filterModel = "#{bindings." XxIncidentRptInjuredPersonsEOView1Query.queryDescriptor}.

    queryListener = ' #{bindings. " XxIncidentRptInjuredPersonsEOView1Query.processQuery}.

    filterVisible = "true" varStatus = "vs."

    selectedRowKeys = ' #{bindings. " XxIncidentRptInjuredPersonsEOView1.collectionModel.selectedRow}.

    selectionListener = "#{bindings." XxIncidentRptInjuredPersonsEOView1.collectionModel.makeCurrent}.

    rowSelection = "single" id = "t1".

    "partialTriggers =": cb2.

    Binding = "#{CreateReportManageBean.injurdemptable} '"

    Width = "100%" >

    - ComboboxListOfValues - Tags

    < af:inputComboboxListOfValues id = "empIdId".

    popupTitle = "search and select: #{bindings." XxIncidentRptInjuredPersonsEOView1.hints.EmpId.label}.

    value = "#{row." Bindings.EmpID.inputValue}.

    Model = "#{row." Bindings.EmpID.listOfValuesModel}.

    required = "#{bindings." XxIncidentRptInjuredPersonsEOView1.hints.EmpId.mandatory}.

    columns = "#{bindings." XxIncidentRptInjuredPersonsEOView1.hints.EmpId.displayWidth}.

    shortDesc = "#{bindings." XxIncidentRptInjuredPersonsEOView1.hints.EmpId.tooltip}.

    autoSubmit = "true" >

    < f: validator binding="#{row.bindings.EmpId.validator}"/ >

    < / af:inputComboboxListOfValues >

    ---------------------------------------------------------------

    Take the af: inputComboboxListOfValues Id (for example, "empIdId") and put it in the partialTriggers of other attributes.

    or

    You can go to pageDef. --> select iterator table--> properties--> Advanced--> ChangeEventPolicy set for ppr

  • I bought the photo Illustrator and ask the Adobe site plan for individuals with credit cards, but to date I have not received the confirmation email. How can I contact for more information on the good end of the order?

    Hello 11/18/2015 I bought Illustrator photo and ask the Adobe site plan for individuals with credit cards, but to date I have not received the confirmation email. How can I contact for more information on the good end of the order?

    Your subscription to cloud shows correctly on your account page?

    If you have more than one email, you will be sure that you use the right Adobe ID?

    https://www.adobe.com/account.html for subscriptions on your page from Adobe

    .

    If Yes

    Some general information for a subscription of cloud

    Cloud programs don't use serial... numbers you, connect you to your cloud account paying to download & install & activate... you may need to sign out of the cloud and restart your computer and log into the cloud for things to work

    Sign out of your account of cloud... Restart your computer... Connect to your paid account of cloud

    -Connect using http://helpx.adobe.com/x-productkb/policy-pricing/account-password-sign-faq.html

    -http://helpx.adobe.com/creative-cloud/kb/sign-in-out-creative-cloud-desktop-app.html

    -http://helpx.adobe.com/x-productkb/policy-pricing/activation-network-issues.html

    -http://helpx.adobe.com/creative-suite/kb/trial--1-launch.html

    -ID help https://helpx.adobe.com/contact.html?step=ZNA_id-signing_stillNeedHelp

    -http://helpx.adobe.com/creative-cloud/kb/license-this-software.html

    .

    If no

    This is an open forum, Adobe support... you need Adobe personnel to help

    Adobe contact information - http://helpx.adobe.com/contact.html

    Chat/phone: Mon - Fri 05:00-19:00 (US Pacific Time)<=== note="" days="" and="">

    -Select your product and what you need help with

    -Click on the blue box "still need help? Contact us. "

  • How to pass a list as a bind variable in SQL Developer?

    How can I pass a list as a bind variable in SQL Developer?

    The following query in SQL Developer so work I put ": prmRegionID = 2.

    SELECT COUNTRY_ID,
    COUNTRY_NAME
    OF HUMAN RESOURCES. COUNTRY
    WHERE IN REGION_ID (: prmRegionID);

    The problem is that I can't find how to set ": prmRegionID = 2, 3.

    I know that I can replace ": prmRegionID" by a proxy '& prmRegionID '. The above query will work well with"& prmRegionID = 2" and with "& prmRegionID = 2, 3". "

    But with this solution, I lost all the benefit of the use of bound variables (analysis hard against soft parse, possibility of SQL injection, etc.).

    I'm learning how to do this in SQL, as well as the use of UDT in this thread: How to move a list as a bind variable?

    But with this solution, I've lost nice SQL Developer user interface. In SQL developer, it is easy to test a query using the standard binding variable. When we start the application, a pop up asking for a value of the variable binding.

    With the UDT, the interface request always variable binding standard. You have an idea on how I can get a variable string binding (such as 1, 2, 10) in a set of NUMBER or VARCHAR2? This way I would be able to launch a standard query in SQL Developer to test my application.


    Can someone tell me what is the best approach to this?

    Thank you in advance,


    MB

    Hi Blais,

    Thank you for trying the SQL and PL/SQL instance before coming here - it was definitely the right approach, and you've got some very good suggestions there. Your needs for a invite only bind to the value in the clause list, I think I have a possible solution. I'll introduce you to a list of characters, so you'll have to tweak it for other types of data. First, add the following to your schema:

    create or replace
    TYPE bind_tab_typ AS TABLE OF VARCHAR2(4000);
    
    create or replace
    FUNCTION comma_to_table(iv_raw IN VARCHAR2)
    RETURN bind_tab_typ
    PIPELINED
    IS
       ltab_lname dbms_utility.lname_array;
       ln_len     BINARY_INTEGER;
    BEGIN
       dbms_utility.comma_to_table(list   => iv_raw
                                  ,tablen => ln_len
                                  ,tab    => ltab_lname);
       FOR i IN 1 .. ln_len LOOP
          PIPE ROW (ltab_lname(i));
       END LOOP;
    END;
    

    Now you can write a query, say for scott.dept, as follows, and have executed statement ask the value list in the clause as a single binding variable:

    select *
    from dept
    where dname in (
      select * from table( comma_to_table( :BNDS ))
    );
    

    When you are prompted, provide the list of values separated by a single comma without any extra spaces.

    I don't know if the Varchar2 (4000) really needs to be which is great. I use it because that's what dbms_utility.lname_array uses.

    Kind regards
    Gary
    SQL development team

  • How to pass variable separated by commas in the bind value of VOquery?

    Version 11.1.1.3.0
    The guys need to help you on this

    I have a VO with query somethg as below

    SELECT *.
    FROM a schema. Table-name
    WHERE (: Bind_Varible has the value null or Column_Name IN (: Bind_Varible))

    User will be be select several values of the screen and I need to pass these value above bind variable.
    But in the variable binding ADF take everything as a single string, then, how can I pass values separated by commas?

    As SELECT *.
    FROM a schema. Table-name
    WHERE (: Bind_Varible has the value null or Column_Name IN (99,55))

    Thank you
    Any help will be appreciated

    I put mine up in this way, my binding variable is a list of values separated by commas, that is to say ("A, B, C, D") (I have a select that many shuttle) then I used a regexp substr to turn them into a list

     WHERE    :Bind_Batch_NM_Comma_Sep_List IS NULL
             OR batch_nm IN
                   (    SELECT REGEXP_SUBSTR (:Bind_Batch_NM_Comma_Sep_List,
                                              '[^,]+',
                                              1,
                                              LEVEL)
                                  batch_nm
                          FROM DUAL
                    CONNECT BY LEVEL <=
                                    REGEXP_COUNT (:Bind_Batch_NM_Comma_Sep_List,
                                                  ',')
                                  + 1)
    

    Published by: pollywog on September 18, 2012 16:07

  • How to create a list of values

    Hi everyone, this is my use case

    There is a table A and a B. There is also a C table that is related to these two table in many to many relationships.

    TABLE A

    Help Name
    1
    2
    3

    TABLE B

    Auction Name
    1
    2
    3

    TABLE C

    CID - help - submission - name
    1 - -- - *1* - -- - +1+
    2 - -- - *1* - -- - +2+
    3 - -- - *2* - -- - +1+


    So if I choose to help either 1 in TABLE C, then the list of bid amounts should show as 3. Is it possible to do?


    Thanks in advance.


    Note:
    The aid is in bold
    Submission is in italics
    I used dashes to make it look like table.
    I am new to this editor.
    Excuse my ignorance.

    Hello
    According to my understanding, you meant that you should have a unique value in the combination of A & B.
    If so,.
    You can create a key to spare with the A & B fields in the entity and validate it against a Unique constraint.
    Then the user can select a combination more than once.

    See the link
    http://www.gabrielsideras.com/2010/09/28/ADF-unique-key-validation/

    Rognard

  • How to pass part of APEX values in a web link

    Starting from a button in a form at the APEX 4.1 I'm redirecting to a mod_plsql generated HTML page. The package that generates receives a parameter called DocID

    The button definition I selected the option to redirect to URL and the URL is:
       http:///server:port/blackpls/FAQTool.GenerateBody?DocID=&P1_DOCUMENTID
    where P1_DOCUMENTID is a page element. When I look at the URL I get something like this:
     http:///server:port/blackpls/FAQTool.GenerateBody?DocID=&P1_DOCUMENTID
    If I add a point at the end of the URL in the APEX, I get
     http:///server:port/blackpls/FAQTool.GenerateBody?DocID=
    Don't see no value in the end


    How can second question, I open it in a new html window? As target = new

    Thank you

    Edited by: FabioBui, Sep 22, 2011 12:14

    The URL related to redirect is rendered when the page is loaded, when the element is probably still a Virgin.
    I would like to change it to run javascript like:

    JavaScript:Window.Open('http:///Server:port/blackpls/FAQTool.GenerateBody?docid='+$v('P1_DOCUMENTID'), '_blank');

  • How to pass a user selected value in presentation GROUP to the flow of the screen

    Hello

    I wonder to display a table GUID (Group) comes from a database, so that the user can select (click on) one of the multiple rows that are returned in the presentation.

    based on the value of the user has selected the need to do a few checks and view full details of the message.

    I am not able to pass this selected user GUID as a parameter to the flow of the screen for the automatic object that manipulates and retrieves the full details of the message from DB based on some queries.

    is it possible that we can get value selected by the user of presentation to the flow of the screen? If so someone can help.

    Thank you
    Satya

    Hello

    you don't need to pass arguments. This attribute is part of your instance variable used in your interactive element.

    You said after this interactive element, there is an automatic element is extracted full message, is it? Then, in this automatic element, you can access myInstanceVar.myAttribute.

    If this does not resolve your problem, tell me an email to send you a sample project (I don't know if it is possible to attach a file here).

    Juan.

  • How to pass APEX_UTIL. COUNT_CLICK parameters in the url

    Hello

    I have to count clicks on list items:

    There is an option to click Accounts in the definition of each element of the list,
    and you can add category County click here.

    However, I also need to add the parameter Id click - p_id.
    This parameter (p_id) suppose to pass a value in the column CLICK_ID in the APEX_WORKSPACE_CLICKS view.
    I built a url for it.
    The url without p_id works perfectly:
    z?p_url=f?p=&APP_ID.:43:&APP_SESSION.::NO:::&p_cat=Common&p_company=&WORKSPACE_ID.&p_user=&APP_USER.
    But the url with p_id does not at all:
    z?p_url=f?p=&APP_ID.:43:&APP_SESSION.::NO:::&p_cat=Common&p_id=Profile&p_company=&WORKSPACE_ID.&p_user=&APP_USER.
    Do you know how to pass p_id parameter in the url, so that he would be inserted in the view of apex_workspace_clicks?

    Thank you!

    CLICK_ID of the APEX_WORKSPACE_CLICKS column is a number, then you need a number, ex:

    & p_id = 1

    If your url should look like:

    z?p_url=f?p=&APP_ID.:43:&APP_SESSION.::NO:::&p_cat=Common&p_id=1&p_company=&WORKSPACE_ID.&p_user=&APP_USER.
    

    You can use a page number associated with a click, to be more descriptive

  • From the list of values in the procedure and trying to validate values

    Hello

    I create a procedure that will allow to validate data entered by the user.  Users can add values in a text box on my web page and I need to pass to an oracle procedure and check the table if these values exist.  I need to return a list of values that do not exist.  That's what I have so far

    CREATE OR REPLACE PROCEDURE VALIDATE 
    (
      P_VLIST IN VARCHAR2 ,
      P_RECORDS OUT SYS_REFCURSOR
    )
    AS
      V_SQL VARCHAR2(4000) := '' ;
    BEGIN
    V_SQL :=          'SELECT VAL '||CHR(10) ;
    V_SQL := V_SQL || 'FROM DVALUES '||CHR(10) ;
    V_SQL := V_SQL || 'WHERE VAL NOT IN (' || P_VLIST || ')'||CHR(10) ;
    V_SQL := V_SQL || ' ORDER BY VAL' ||CHR(10) ;
    OPEN P_RECORDS FOR V_SQL;
    END VALIDATE ;
    /
    

    My problem is that it will return all the values of DVALUES.  Can I put my list into a temporary table and do a left join to DVALUES and where the values of the two tables I can create a bool column that has a 1 or 0 indicating whether or not the value is good then select on the table and return the list of bad values?

    Thank you

    SQL > CREATE OR REPLACE
    PROCEDURE (2) P_VALIDATE
    3 P_VLIST IN VARCHAR2,
    4 P_RECORDS OF THE SYS_REFCURSOR
    5                        )
    6 AS
    V_STMT 7 VARCHAR2 (4000);
    BEGIN 8
    9 V_STMT: = ' SELECT ELEMENT FROM (SELECT ";)
    10 V_STMT: = V_STMT | REPLACE (P_VLIST, ',', 'ELEMENT OF DOUBLE UNION ALL SELECT');
    11 V_STMT: = V_STMT | FROM DUAL) WHERE THERE IS NO (SELECT 1 FROM DVALUES WHERE VAL = ELEMENT)';
    12. OPEN P_RECORDS TO V_STMT;
    13 END P_VALIDATE;
    14.

    Created procedure.

    SQL > EXEC P_VALIDATE('10,15,20,25,30,35,40',:V_CUR)

    PL/SQL procedure successfully completed.

    SQL > V_CUR PRINT

    ELEMENT
    ----------
    15
    25
    35

    SQL >

    SY.

  • List of value in the field of handling returned by getValueList() - ConstraintEnumeration

    I would like to create a script to extract, for each column using a domain, a list like this format:

    tableName. columnName | domainValue | domainValueDescription

    But the problem is that domain.getValueList (), agreeing with the documentation, returns a type of ConstraintEnumeration and may be a silly question, but I do not know how to navigate through this object to get the values and descriptions.

    It's the example script:

    var tables = model.getTableSet () .toArray ();

    for (var t = 0; t < tables.length; t ++) {}

    var table = tables [t];

    var columns = table.getElements ();

    for (var c = 0; c < columns.length; c ++) {}

    var column = columns [c];

    If (Column.getUse () == 0 & & column.getDomain ()! = null) {}

    field var = column.getDomain ();

    var valueList = domain.getValueList ();

    / / how iterate valueList?

    }

    }

    }

    I looked at the documentation but this class is undocumented, so I do not know the methods available and had no luck in trying to discover with the debugger.

    I appreciate all help.

    Thank you.

    Hello

    Yes, the documentation for ConstraintEnumeration does not seem to miss.

    For your case, there is a getValuesDescriptionMap() method that returns a map that contains an entry for each value and maps the values of their descriptions.

    David

  • validation error message is not displayed for an attribute as a list of value of the entry

    Hello world

    I use jdev 11.1.1.7.0

    In my application, I created an entity Obj and Obj employees base table.

    for the attribute JobId , I took the actions listed below:

    1. in the EO staff, I created a validation for this attribute and in some cases the error message returns (the error message is "the salary is not high"):

        /**
         * Validation method for JobId.
         */
        public boolean validateJobId(String jobid) {
    
    
            if (...) {
                return false;
            }
    
    
            if (...) {
                return false;
            }
    
    
            if (...) {
                return false;
            }
    
    
         
            return true;
        }
    

    2. employees Vo, I created a LOV for this attribute (the view accessor is JobsViewObj) and I display the attribute entry of text with a list of values.

    in the jspx page, I drag / drop this attribute as below:

              <af:inputListOfValues id="jobIdId"
                                    popupTitle="Search and Select: #{bindings.JobId.hints.label}"
                                    value="#{bindings.JobId.inputValue}"
                                    label="#{bindings.JobId.hints.label}"
                                    model="#{bindings.JobId.listOfValuesModel}"
                                    required="#{bindings.JobId.hints.mandatory}"
                                    columns="#{bindings.JobId.hints.displayWidth}"
                                    shortDesc="#{bindings.JobId.hints.tooltip}"
                                    autoSubmit="true">
                <f:validator binding="#{bindings.JobId.validator}"/>
              </af:inputListOfValues>
    

    I opened the popup and I select a line in the list and then I click Ok. After that, if the validation method (validateJobId) returns false, the error message ("the salary is not high") must be show to the user. but the error message does not appear. I don't understand why this is happening.

    Can anyone guide me on this problem?

    Concerning

    Habib

    Hello Dario,

    I just found this post: http://andrejusb.blogspot.nl/2013/12/workaround-for-infamous-bug-13626875.html that apply ExceptionMode = immediate adjustment to control the use of data in DataBindings.cpx, then the error message is displayed as I hope.

    Concerning

    Habib

  • List of values of the parameters Sys_Context

    I have a package which is store values in a context of system so they can be shared by all sessions without the overhead constantly querying a table. My question is, after I have a number of pairs name / value of the context, is there a way I can get a list of the parameter set following context he names?

    All the examples I found in the docs use USERENV as the context and extract the values using the list of names known. I need a way to get all the parameters without necessarily knowing the name beforehand.

    Thank you

    >
    I have a package which is store values in a context of system so they can be shared by all sessions without the overhead constantly querying a table. My question is, after I have a number of pairs name / value of the context, is there a way I can get a list of the parameter set following context he names?

    All the examples I found in the docs use USERENV as the context and extract the values using the list of names known. I need a way to get all the parameters without necessarily knowing the name beforehand.
    >
    Use the view system "global_context".

    select * from global_context;
    
    select * from v$globalcontext;
    

Maybe you are looking for

  • Apple Watch Wifi connection

    I recently bought a Apple Watch sport and noticed that it does not connect to my home network. Can someone help me to try to connect to the network? I have at & t and Motorola NVG589 router, I believe that it is compatible with the Apple Watch.

  • Satellite Pro M10: firmware upgrade DVD UJ - 830 B FW:1.50, HW:1.00 issue

    HelloI tried to replace the old DVD/CDRW with UJ - 830B above (FW: 1.50, HW: 1.00) but the result was the mistake of the IDE. It's not recognize it at all in Windows.I tried to solder the contact 48 and 49, but the result is the same. How can I make

  • HP Security Manager

    When I install the hp Security Manager client on my hp probook 450 g0 to the last step it shows error 1001.I using windows 8.1.And I don't use fingerprint software also. Please help me.

  • Useful examples of best practices of coding in large programs

    Hi, ive been writing code for a dozen years now. A good piece on labview know now lmao! But want to get acquainted with code practices, for example by creating programs, code templates, avoiding race conditions, use multiple loops and be able to writ

  • WebWorks structure bad XML OS 7 - config.xml error analysis-

    I get this error when compiling with SDK WebWorks 2.3.1.5 [INFO]                  Parsing of the command line options[INFO]                  Bbwp.properties analysis[INFO]                  Validation of archive application[INFO]                  The