SQL statement in an input parameter

Hi all

I would like to create a workflow with a single parameter. Must be the user logon and search based on the user in a SQL database where the server names are mapped to users with the same format as the user to logon. The parameter must present an array of server names that are mapped in the DB the user to logon.

Here is an example of what I mean:

SQL-Table

User Server name
Karl HeinzSRV1000
Karl HeinzSRV1001
Peter SmithSRV1002
Peter SmithSRV1003

Karl Heinz connect to the vCO or webview and start the workflow, he could only see SRV1000 and SRV1001.

Anyone have an idea how I can build this workflow.

Thank you.

The Action to add the last line

Return resultingArray;

to restore the results.

Does not have that in the second example.

See you soon,.

Joerg

Tags: VMware

Similar Questions

  • Pl/sql table as an input parameter

    Hello.

    I need to know if it is possible to use a pl/sql table as an input parameter to a stored procedure in a package.

    Right now I ve compiled the procedure correctly, but when I try to call, I´ve-PLS-00330.

    EXAMPLE:
    This is the package:

    CREATING a PACKAGE test IS
    TYPE table_list IS TABLE OF VARCHAR2 (20) INDEX directory.
    PROCEDURE proc_test (list IN table_list);
    END TEST;
    /

    Test to CREATE THE PACKAGE BODY IS
    PROCEDURE proc_test IS
    BEGIN
    BECAUSE me IN the list. ... FIRST list. LAST
    LOOP
    DBMS_OUTPUT. Put_line (i);
    END LOOP;
    END proc_test;
    END test;
    /

    And I m trying to call with a block anonimous like this:

    BEGIN
    DECLARE
    TYPE ΠIS TABLE OF VARCHAR2 (20) INDEX directory.
    BEGIN
    call_list (1): = "my_record_1";
    call_list (2): = "my_record_2";
    call_list (3): = "my_record_3";
    test.proc_test (call_list);
    END;

    And then, I ve
    ORA-06550: line 8, column 2:
    PLS-00330: invalid use of the name of type or subtype

    Do you understand how I have to do?

    Thanks for your help.

    Respect of

    You call it with the type that you defined.

    BEGIN
    DECLARE
    call_list test.table_list := test.table_list();
    BEGIN
    call_list(1) := 'my_record_1';
    call_list(2) := 'my_record_2';
    call_list(3) := 'my_record_3';
    test.proc_test(call_list);
    END;
    
  • manage an invalid input parameter

    Hello

    How to build a message indicating what input parameter has an invalid value. ?
    CREATE OR REPLACE PROCEDURE loaddata ( pGroupID         IN  VARCHAR2,
                                              pOrderNumber  IN  VARCHAR2,
                                              pOrderDate       IN  DATE,
                                              pItemName       IN  VARCHAR2,
                                              pErrorcode         OUT  NUMBER,
                                              pErrormssg        OUT VARCHAR2 )
    Thank you
    Sandy

    Thanks for the reply... It is part of the package and supposed to highlight package, after a few modifications.

    OK, but this does not add to your description.

    How to view the message

    In general, you do not display messages. Throw you exceptions in pl/sql.

    5 input parameter which parameter was incorrect or incompatible data type?

    Your procedure has 4 in. and 2 out parameters.

    You can not call a procedure with incorrect arguments.

    Inside of your procedure, you have to assume that his name was properly or an exception would have been thrown in the environment called him.

    If the arguments must be validation, you must do the proper tests and throw exceptions as needed.

  • SQL * more: how string manipulation on the input parameter?

    Hi people,

    I will be grateful if you could help me create a sql (NOT a bash script!) script that uses a substring of the input parameter to a file name that will be rolled up into stuff.

    example:

    -sample.sql

    which can be used as:

    -$ sqlplus/nolog @sample.sql abcd_efgh

    and the script works similar to the pseudo-code below:

    "...

    file_name = 'test_ ' | substr ("& 1 ', 6)

    name of spool file

    ...

    spool off

    "

    Thank you

    Babak

    Hello

    I found a solution:

    "

    ...

    column new_value filename filename

    Select "test_". filename substr('&1',6)

    Double;

    coil & filename

    ...

    spool off

    ..."

  • Custom adapter DB SQL statement

    Is it possible to pass where clause parameters to a SQL statement custom DB adapter on the fly?

    In querry custom wizard, you simply put:

    Select entrydate, projectid, Billable, sum (duration) duration
    of Dailyactivity_invoice
    where projectid = * #p_project_id *.
    Entrydate group, projectid, billable

    This will make p_project_id an input parameter, you can set using assign before call for adapter

    Adam

  • problem with writing a procedure with the name of the table as an input parameter

    Hi all

    I am writing a procedure with the table name as input parameter:
    Here is the code

    create or replace procedure CEP (in_tbl in varchar2)
    as
    Start

    run immediately 'truncate table tlb;

    Insert into tbl

    Select a, b, c of in_tbl;

    end;

    user579585 wrote:
    Hi all

    I am writing a procedure with the table name as input parameter:
    Here is the code

    create or replace procedure CEP (in_tbl in varchar2)
    as
    Start

    run immediately 'truncate table tlb;

    Insert into tbl

    Select a, b, c of in_tbl;

    end;

    You will also need to use dynamic sql for insert statements:

    execute immediate 'begin insert into tbl select a,b,c from '||in_tbl||'; end';
    
  • Game of demand does not pick up the good period open to active fixed from the SQL statement

    Hello

    We have a demand that could kick off the simultaneous application of the value: Ixr: list of asset by period and Ixr: reserve book report.


    ON overall demand, we set the parameter: default period based on a SQL = select period_name from FA_DEPRN_PERIODS where book_type_code = 'PER2011' and period_close_date is null


    The query runs with the good period, until we open the new period, the game application will still come closed period.

    When I run this script on the database, it gives the correct name of the open period.


    Why all the demand does not pick up the open period?


    Rock


    Hello

    When planning, the parameter values that you gave when planning will not change.

    For the test, for a simultaneous program, I create a parameter and has given the value 100 tank and default type sql statement and the value as below.

    Select to_char (sysdate, 'dd-mon-yyyy hh24:mi:ss') of double

    If, at the time of the program, it shows a default value such as the date and time with seconds. Then I planned it for every minute.

    When you check in for each race it is seen the first time only, it does not.

    so in your case, you must plan its new after change of period.

    Hope this will help you...

  • The input parameter to pass between 2 maybe bounded task flows a whole list of table or table?

    Hello experts, Im a beginner to ADF dev, currently using Jdev / ADF 12 c.

    I need to move from a table or list of tables of the values of A bounded task flows to delimited the workflow B. How to do in this case, the use of an input parameter?

    I mentioned the following links which have had in the string values as an input parameter, and replaced related fields accordingly with the data type of table list, but it did not work:

    http://docs.Oracle.com/CD/E21764_01/Web.1111/b31974/taskflows_parameters.htm#ADFFD1689

    https://technology.AMIS.nl/2014/01/21/taskflow-InputParameters-explained/

    Oracle JDeveloper 12 c (12.1.2) tutorials - working with stubborn workflows, regions and routers

    The requirement of the business is such that I need 2 different workflow, where the workflow B must be in a popup with train component.

    I thought of using just a stream unique task bounded with pop-up windows on the pop-up windows... which is less elegant... y at - it smoother workaround?


    Thank you very much.

    Even though I know this isn't answering your question, let me stress the design element: in the ADF, view objects are intended to replace beans support / managed in ADF in detention is. It is one of the worst confusion with ADF + ADF BC, where people still use accompanying beans on the scope of the session/view/task flow to maintain user state. Instead of this, you must use display objects, the objects in view transition in case the data does not come directly form DB.

    To finally answer your question: you can pass any type of objects for workflow settings, just make your parameter of type java.lang.Object. Then you can convert it in turn, in the second task flow.

  • Trace is still get generated even after disabling the option of initializing SQL statement - Custom profile

    Hi all

    We have a problem with the profile option "initialize SQL statement - Custom." We put this at the user level. After awhile, we have erased the value of the this user profile option.

    But you can still see the trace files generated are getting updated. We checked this files trc pathname returned at the bottom of the query.

    Select name, value

    the parameter $ v

    WHERE name like 'user_dump_dest;

    Please help us on how to solve this problem. We use Oracle Apps R 12.1.2 version.

    Thanks in advance

    Rambaud

    Find the trace file creation session and kill this session

    HTH
    Srini

  • "PL/SQL: statement ignored ' from the outset?

    I am brand new to PL/SQL and I just can't understand what is wrong. Any help?
    SQL> 
    SQL> create or replace procedure HW3 (
      2            p_buy number    ) as
      3  
      4            v_pay number;
      5  
      6  begin
      7            v_pay := p_buy(3/4);
      8  
      9            dbms_output.put_line ('You entered: ' || p_buy);
     10            dbms_output.put_line ('You will be charged for: '||trunc(v_pay));
     11  
     12  end;
     13  /
    
    Warning: Procedure created with compilation errors.
    
    SQL> 
    SQL> show errors;
    Errors for PROCEDURE HW3:
    
    LINE/COL ERROR                                                                  
    -------- -----------------------------------------------------------------      
    7/2      PL/SQL: Statement ignored                                              
    7/11     PLS-00222: no function with name 'P_BUY' exists in this scope          
    SQL> 
    SQL> spool off
    I did very simple procedures with several settings, but this code just won't go.

    Have you defined a p_buy function?

    Or finally do you hear that in the first line after begin in your code?

    v_pay := p_buy * (3/4);
    

    When you write p_buy(3/4) the compiler thinks p_buy is a function and you want to call with parameter 3/4.

    Published by: hm on 11.10.2011 23:39

  • Impossible to connect to sql State = s1000

    Impossible to connect to sql State = s1000
    Ora Oracle - odbc - 28000: account is locked

    This happened when a user connecting to test the connection.
    can anyone solve this problem?

    Question: The user accordingly entered wrong password for the maximum number of times specified by the parameter of the FAILED_LOGIN_ATTEMPTS user profile, or the ADMINISTRATOR has blocked the account

    Action: Wait at PASSWORD_LOCK_TIME or contact DBA

    http://www.DBA-Oracle.com/sf_ora_28000_the_account_is_locked.htm

    or

    If you have sysdba privileges: -.

    connect sysdba virtue

    change the user name user account unlock;

    where username is the user name that was trying to connect for test.

    Published by: varun4dba on January 10, 2011 18:53

  • application of SQL statement tuning

    Application of SQL statement tuning

    1 SQL: Code that never ends. 11 hours running, but nothing get inserted into tables

    2. database version:
    SELECT * FROM V$VERSION;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
    PL/SQL Release 10.2.0.4.0 - Production
    CORE    10.2.0.4.0    Production
    TNS for Solaris: Version 10.2.0.4.0 - Production
    NLSRTL Version 10.2.0.4.0 - Production
    3.
    (i)
    SQL> SHOW PARAMETER OPTIMIZER
    
    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    optimizer_dynamic_sampling           integer     2
    optimizer_features_enable            string      10.2.0.4
    optimizer_index_caching              integer     0
    optimizer_index_cost_adj             integer     100
    optimizer_mode                       string      ALL_ROWS
    optimizer_secure_view_merging        boolean     TRUE
    SQL>
    BIF
    SQL> SHOW PARAMETER DB_FILE_MULTI
    
    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    db_file_multiblock_read_count        integer     16
    SQL>
    (III)
    SQL> SHOW PARAMETER DB_BLOCK_SIZE
    
    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    db_block_size                        integer     8192
    SQL>
    (IV)
    SQL> SHOW PARAMETER CURSOR_SHARING
    
    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    cursor_sharing                       string      EXACT
    SQL>
    4 calendar and Autotrace output
    one)
    SQL>
    SQL> SET AUTOTRACE TRACEONLY
    SQL> Query;
    
    
    99999 rows selected.
    
    
    Execution Plan
    ----------------------------------------------------------
    Plan hash value: 888060805
    
    --------------------------------------------------------------------------------
    
    ------
    
    | Id  | Operation          | Name            | Rows  | Bytes | Cost (%CPU)| Time
    
         |
    
    --------------------------------------------------------------------------------
    
    ------
    
    |   0 | SELECT STATEMENT   |                 | 99999 |   171M|  6452   (1)| 00:0
    
    1:18 |
    
    |*  1 |  COUNT STOPKEY     |                 |       |       |            |
         |
    
    |   2 |   TABLE ACCESS FULL| STGING| 99999 |   171M|  6452   (1)| 00:0
    
    1:18 |
    
    --------------------------------------------------------------------------------
    
    ------
    
    
    Predicate Information (identified by operation id):
    ---------------------------------------------------
    
       1 - filter(ROWNUM<100000)
    
    
    Statistics
    ----------------------------------------------------------
              8  recursive calls
              0  db block gets
          33379  consistent gets
          24108  physical reads
              0  redo size
      177773283  bytes sent via SQL*Net to client
          46901  bytes received via SQL*Net from client
           6668  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
          99999  rows processed
    (b)
    SQL> SET AUTOTRACE TRACEONLY EXPLAIN rem Could't do SET AUTOTRACE TRACEONLY as query takes a long time.
    SQL> Query;
    
    Execution Plan
    ----------------------------------------------------------
    Plan hash value: 696991379
    
    --------------------------------------------------------------------------------
    
    -------------------------
    
    | Id  | Operation                     | Name            | Rows  | Bytes |TempSpc
    
    | Cost (%CPU)| Time     |
    
    --------------------------------------------------------------------------------
    
    -------------------------
    
    |   0 | SELECT STATEMENT              |                 | 99999 |   171M|
    | 77733   (1)| 00:15:33 |
    
    |   1 |  HASH UNIQUE                  |                 | 99999 |   171M|   390M
    
    | 77733   (1)| 00:15:33 |
    
    |*  2 |   CONNECT BY WITHOUT FILTERING|                 |       |       |
    |            |          |
    
    |   3 |    VIEW                       |                 | 99999 |   171M|
    | 40120   (1)| 00:08:02 |
    
    |*  4 |     COUNT STOPKEY             |                 |       |       |
    |            |          |
    
    |   5 |      TABLE ACCESS FULL        | STG_OLD_RUBRIC1 |   621K|  1066M|
    | 40120   (1)| 00:08:02 |
    
    --------------------------------------------------------------------------------
    
    -------------------------
    
    
    Predicate Information (identified by operation id):
    ---------------------------------------------------
    
       2 - filter(LEVEL<=(LENGTH("STRING")-LENGTH(REPLACE("STRING",'
    
    Criterion:')))/10
    
                  )
       4 - filter(ROWNUM<100000)
    
    SQL>
    6. explain Plan output
    SQL> ed
    Wrote file afiedt.buf
    
      1  EXPLAIN PLAN SET STATEMENT_ID = 'A' FOR
      2  QUERY;
      3 /
    
    Explained.
    
    
    SQL> SELECT * FROM TABLE (DBMS_XPLAN.DISPLAY);
    
    PLAN_TABLE_OUTPUT
    --------------------------------------------------------------------------------
    
    Plan hash value: 696991379
    
    --------------------------------------------------------------------------------
    
    -------------------------
    
    | Id  | Operation                     | Name            | Rows  | Bytes |TempSpc
    
    | Cost (%CPU)| Time     |
    
    --------------------------------------------------------------------------------
    
    -------------------------
    
    
    PLAN_TABLE_OUTPUT
    --------------------------------------------------------------------------------
    
    |   0 | SELECT STATEMENT              |                 | 99999 |   171M|
    | 77733   (1)| 00:15:33 |
    
    |   1 |  HASH UNIQUE                  |                 | 99999 |   171M|   390M
    
    | 77733   (1)| 00:15:33 |
    
    |*  2 |   CONNECT BY WITHOUT FILTERING|                 |       |       |
    |            |          |
    
    |   3 |    VIEW                       |                 | 99999 |   171M|
    | 40120   (1)| 00:08:02 |
    
    PLAN_TABLE_OUTPUT
    --------------------------------------------------------------------------------
    
    
    |*  4 |     COUNT STOPKEY             |                 |       |       |
    |            |          |
    
    |   5 |      TABLE ACCESS FULL        | STGING|   621K|  1066M|
    | 40120   (1)| 00:08:02 |
    
    --------------------------------------------------------------------------------
    
    -------------------------
    
    
    
    PLAN_TABLE_OUTPUT
    --------------------------------------------------------------------------------
    
    Predicate Information (identified by operation id):
    ---------------------------------------------------
    
       2 - filter(LEVEL<=(LENGTH("STRING")-LENGTH(REPLACE("STRING",'
    
    Criterion:')))/10
    
                  )
       4 - filter(ROWNUM<100000)
    
    19 rows selected.
    
    SQL>
    7. from TKPROF output
    SQL> alter session set timed_statistics = TRUE;
    
    Session altered.
    
    SQL> alter session set sql_trace = TRUE;
    
    Session altered.
    
    SQL> query; rem it is still running, no idea what is going on.
    Any advice. Why the request is not able to generate a trace file and take so long?


    Let me know, if needed further information.

    Thank you.

    Something like that...?

    WITH T
    AS
    (SELECT 'Criterion: Crit1.
    Proficient (points 2): Crit1 text.
    Criterion: Crit2.
    Basic (points 1): Crit2 text.
    Criterion: Crit3.
    Proficient (points 2): Crit3 text.
    Criterion: Crit4.
    Basic (points 1): Crit4 text.
    Criterion: Crit5.
    Proficient (points 2): Crit5 text.
    Proficient (points 2): Crit5 text.
    ' latest_comment FROM DUAL union all SELECT 'Criterion: Crit1.
    Proficient (points 2): Crit1 text.
    Criterion: Crit2.
    Basic (points 1): Crit2 text.
    Criterion: Crit3.
    Proficient (points 2): Crit3 text.
    Criterion: Crit4.
    Basic (points 1): Crit4 text.
    Criterion: Crit5.
    Proficient (points 2): Crit5 text.
    Proficient (points 2): Crit5 text.
    ' latest_comment FROM DUAL union all SELECT 'Criterion: Crit1.
    Proficient (points 2): Crit1 text.
    Criterion: Crit2.
    Basic (points 1): Crit2 text.
    Criterion: Crit3.
    Proficient (points 2): Crit3 text.
    Criterion: Crit4.
    Basic (points 1): Crit4 text.
    Criterion: Crit5.
    Proficient (points 2): Crit5 text.
    Proficient (points 2): Crit5 text.
    ' latest_comment FROM DUAL ) SELECT SUBSTR(REGEXP_SUBSTR(latest_comment,'Criterion:[^<]+', 1, n.column_value), 20) column1, SUBSTR(REGEXP_SUBSTR(latest_comment,'points [^\)]+', 1, n.column_value), 8) column2, SUBSTR(REGEXP_SUBSTR(latest_comment,'\):[^<]+', 1, n.column_value), 3) column3, SUBSTR(REGEXP_SUBSTR(latest_comment,'blockquote>[^<]+', 1, n.column_value), 12) column4, SUBSTR(latest_comment, INSTR(latest_comment, '>', -1) + 1) column5 ,n.column_value FROM t,table(cast(multiset(select level from dual CONNECT BY LEVEL <= (LENGTH(latest_comment) - LENGTH(REPLACE(latest_comment, 'Criterion:')))/10) as sys.OdciNumberList)) n ;

    Kind regards
    Bob

  • ORA-00900 - the SQL commands: invalid SQL statement

    Hello world
    I installed Oracle Xe on a Centos 5.5 host yesteday.
    Installation was Ok, I can connect to the web interface on "http://127.0.0.1:8080 / apex / '.
    But when I want to use sql commands, regardless of the input control, I have the "ORA-00900: invalid SQL statement" message.
    I can enter the command "Show all", for example, in a terminal after SQL > command prompt, it works... but not in the web interface...
    I tried to import the .sql, script trought the web interface, no much result, no display in the window.
    Can someone help me,
    Thank you

    Show all is NOT a SQL command is a command that I think, not a command from pl/sql, sql more... Why not try to do a select on a table is know YOU the schema...

    Thank you

    Tony Miller
    Webster, TX

  • SQL statements consume several times

    Hi all

    Recently I have faced the issue, 10 processes are taking place (means 10 sql statements) 4 declarations are huge time. For timebieng, I killed all sessions, but I know that's not just solve the problem. Can someone please explain briefly how to analyze the issue, root cause conclusion and giving if possible solutions for example please...

    What are the parameter that should be considered for the solution.


    Concerning

    KRISHNA

    Hello Krishna,

    The steps you need to take are explained in this thread:
    How to post a SQL tuning application HOW TO: post a request for tuning SQL - model poster statement

    In short:
    review the query plans, or ideally: trace/tkprof processes.
    After the output here, as well as your database version and optimizer parameter values.

  • 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

Maybe you are looking for