Simple SQL Query Output

Table1:
ID      EMPNAME COUNTRY
101     XYZ     USA
102     ABC     UK
103     XYZ     USA
104     ABC     UK
Required output:
ID      EMPNAME COUNTRY CALCULATED_VALUE
101     XYZ     USA     1
102     ABC     UK     1
103     XYZ     USA     0
104     ABC     UK     0
Every 1st record of (EMPNAME, COUNTRY) combination should have CALCULATED_VALUE =1 and all succeeding records of same (EMPNAME, COUNTRY) combination should have CALCULATED_VALUE =0

Try this ->
scott>
scott>select * from v$version;
BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
PL/SQL Release 10.2.0.1.0 - Production
CORE    10.2.0.1.0      Production
TNS for Linux: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production
Elapsed: 00:00:00.02
scott>
scott>
scott>with t
  2  as
  3    (
  4      select 101 ID, 'XYZ' EMPNAME, 'USA' COUNTRY from dual
  5      union all
  6      select 102, 'ABC', 'UK' from dual
  7      union all
  8      select 103, 'XYZ', 'USA' from dual
  9      union all
10      select 104, 'ABC', 'UK' from dual
11    )
12  select ID,
13         EMPNAME,
14         COUNTRY,
15         case
16           when rn = 1 then
17             1
18         else
19           0
20         end CALCULATED_VALUE
21  from (
22         select ID,
23                EMPNAME,
24                COUNTRY,
25                row_number() over(partition by COUNTRY order by ID) rn
26         from t
27       )
28  order by ID;
        ID EMP COU CALCULATED_VALUE
       101 XYZ USA                1
       102 ABC UK                 1
       103 XYZ USA                0
       104 ABC UK                 0
Elapsed: 00:00:00.00
scott>Regards.
Satyaki De.

Similar Messages

  • Simple SQL Query and Parameters and LOV

    Newbie and trying to work thru building a simple sql query with a single table query and use a parameter and lov.
    Can anyone point me to an example.
    simple query:
    select cust_id, name_desc, name_add1, name_add2, name_city
    from customer_table
    where cust_id = :cust_parm
    This works in straight sql and in the query builder by prompting for the customer ID. When building a parameter using LOV or search, it doesn't seem to detect the variable.
    Thanks..
    DD

    If you are using version 11g, then as soon as you save the query in the data model, it should notice the parameter and ask if you want to add the parameter to the data model. What version of BIP are you using?
    What happens if you exclude the parameter from the query and simply hard-code the criteria? Can you generate XML data?
    From your wording, it sounds like you're trying to create a parameter from the LOV dialog. LOVs and parameters are totally distinct. After each are created separately, then you configure the parameter to use the LOV.

  • Simple SQL query statement is needed

    I need a simple SQL query to fetch records which is existed in all the departments.
    for example: i want to list the employees which are existed in each and every department.. not sure how should i get those.. will anyone help me please.. thanks in advance

    I think it would be wise to go to the following training:
    Oracle Database <version> : Introduction to SQL
    You will get the information you are looking for in five days. You can go find a tutorial on ANSI SQL, as advised by this board for free, to fix your immediate problem with a simple query. But, I personally recommend a more formal class specific to Oracle, as you will also get information about PL/SQL, and you get the benefit with working with other DBA/programmers when you are learning. This will solve your immediate issue, and any future issues with the language.
    You can find it in the Education section of the Oracle website.

  • Writing a function to find whether a value is present in a sql query output

    Hi gurus,
    I would like to write a function to which i will pass a value and a sql query as parameters.
    Now the function needs to execute that sql query and find whether the given value is present in the output list
    when the query is executed. If it is present it should return 'T' otherwise 'F'
    My function will look like
    CREATE FUNCTION CHECK_VALUE(VALUE VARCHAR2,V_SQL VARCHAR2) RETURN VARCHAR2
    SELECT CHECK_VALUE('Dallas','SELECT LOCATION_CODE FROM HR_LOCATIONS')
    It should check whether the value 'Dallas' is present in the output list returned by the sql query.
    Any help will be appreciated.
    Thank you.

    CREATE OR REPLACE
      FUNCTION CHECK_VALUE(
                           VALUE VARCHAR2,
                           V_SQL VARCHAR2
        RETURN VARCHAR2
        IS
            RETVAL VARCHAR2(4000);
            REFCUR SYS_REFCURSOR;
        BEGIN
            OPEN REFCUR FOR V_SQL;
            LOOP
              FETCH REFCUR INTO RETVAL;
              EXIT WHEN REFCUR%NOTFOUND;
              IF RETVAL = VALUE
                THEN
                  CLOSE REFCUR;
                  RETURN 'T';
              END IF;
            END LOOP;
            CLOSE REFCUR;
            RETURN 'F';
    END;
    Function created.
    SQL> SET SERVEROUTPUT ON
    SQL> EXEC DBMS_OUTPUT.PUT_LINE(CHECK_VALUE('DALLAS','select loc from dept'));
    T
    PL/SQL procedure successfully completed.
    SQL> EXEC DBMS_OUTPUT.PUT_LINE(CHECK_VALUE('PARIS','select loc from dept'));
    F
    PL/SQL procedure successfully completed.
    SQL> SY.

  • Simple SQL query SQL developer takes it, The wizzard of XE does not

    Hello everybody
    I wrote this simple query which SQL developer runs fine, but when I try to launch a Report based on this sql query it tells me invalid sql statement. That is true, it may be invalid because this IF clause in there..but SQL developer seems to be very tolerant or understands more...
    the reason I wrote that is because obviously if there are no bosses, ie = 0 then i would get an error when dividing it by 0, so I put that 0 just to select the good ones
    if count (bosses) >0
    select company, postcode,
    sum( bosses/staff)
    from evaluation
    group by company, postcode
    Thank you very much
    Alvaro

    oh yes (blushed in shame as how dumb i looked like) i knew about the denominator 0 and infinite as as result i just didnt notice my zero was on the numerator :(
    however, i run the query and i got this message in sql developer
    Error starting at line 1 in command:
    select company, postcode,
    case when staff != 0 then sum( bosses/staff) end
    from evaluation
    group by company, postcode
    Error at Command Line:2 Column:10
    Error report:
    SQL Error: ORA-00979: not a GROUP BY expression
    00979. 00000 - "not a GROUP BY expression"
    *Cause:   
    *Action:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Formatting SQL Query output in HTMLDB

    Guys, I would like to show the result in report of SQL Query to be formatted in such way:
    I got a table USERS with columns:FIrst_name, second_name, team_name, team_leader.
    So in a report in HTMLDB I would like to format the result to show all employees , 500 of them, on 1 page, and show in a header for each team, team leader and team name with the rest of team underneath,so only two columns, break on team_leader or team_name, then next team, and then, NOT all this in one long display, but in three sets of result, spread in wide of report, cause the screen dimensions are quite wide.I tried few things but they do not work. I can break on tem leader or team name, but all this is still in one long set of result, not in 3 or 4 tables sets.
    help
    Jozef

    Hi Kamal,
    I am using Oracle Applications 11.5.7 iProcurement. Database is 9i. I need to place a link in iProcurement homepage using AK Developer and when clicked it should run a query and output the result in a browser.
    help appreciated
    thanks

  • A simple SQL query question

    I have an interesting problem and wondering how I can get this result in a single SQL query:
    Here is table emp has data with a row for every year since the employee joined with the salary paid that particular year with following columns:
    emp (
    id varchar2(10),
    name varchar2(25),
    interested_year date,
    salarypaid number(10)
    I would like to print the results as follows:
    id name previousyear_salarypaid currentyear_salarypaid
    x xxxxx xxxxxx xxxxx
    Is this possible to do? I have tried to simplify my actual problem so I hope I have included all necessary details.

    Just to clarify, the columns mentioned in the results are
    previousyear_salarypaid is nothing but
    salarypaid where interested_year = '2007'
    currentyear_salarypaid is nothing but
    salarypaid where interested_year = '2006'

  • SQL query Output  exceeds 65000 rows in excel

    Hi,
    I have a SQL file attached to my concurrent program. The query in the SQL file returns tab separated output that i need to email as a csv through the same SQL file.
    The issue I am facing is that the query returns about 157000 records but only 65536 are being displayed in the excel worksheet.
    How can I get all the records by accommodating them in multiple worksheets of the same excel file?
    Please help!
    I am using EBS 11i.
    Code I am using in SQL file:
    set pages 3000
    set lines 300
    set heading off
    set term off
    set feedback off
    set verify off
    set echo off
    set serverout off
    spool /tmp/TEST.csv
    select 'Header'
    from dual
    SELECT column1||CHR(9)||column2
    FROM staging_table
    spool off
    set lines 1000 pages 40 head off echo off veri off
    select 'cd /tmp; cat $XX_TOP/install/sql/disclaimer.txt > x.dat; cat '||'/tmp/TEST.csv'||' | uuencode '||'/tmp/TEST.csv'
    ||' > '||substr('/tmp/TEST.csv',1,length('/tmp/TEST.csv')-4)||'.dat >> x.dat'
    ||' ; mail -s ''' ||'&1'||''' '||'&2'||' < x.dat'
    ||' ; rm '||substr('/tmp/TEST.csv',1,length('/tmp/TEST.csv')-4)||'.dat'||' ;'
    from dual
    list
    spool /tmp/email.txt
    spool off
    host chmod 777 /tmp/email.txt
    host /tmp/email.txt
    Thanks
    Edited by: user10648285 on May 13, 2011 5:27 AM

    open a blank Excel (2007 version), go to Data tab, then from External Data click From Text, select the CSV file (That having more than 65k records), click import, then from "start import at row" select 65001 and click next button, select delimiter as Comma, click Next button and filaly finish.
    In this way you will have the data after 65k rows in excel. Now you can simply open that cvs file in excel then you will have first 65k records (remening part will be discarded).
    So now you have two excel files and you can paste it in two diff tab.
    Note - you can repeate this activity if you have more than 130000 records...

  • SBO SQL Query outputs zero values as nulls but need the zeros

    Hi all,
    I'm having a problem with a query I'm writing in SBO where if the field contents are zero, these are output as null.
    I have a field for the stock usage on sales orders and ont too for production orders, but if I add these together they only provide a result if both columns contain a numeric value.
    I've tried adding "0" to the column value, adding and subtracting "1" and also multiplying the value by "1" but still no joy.
    I have also tried adding a "cast" statement to the column, but that doesnt seem to have an effect either (I think as this is more an output function).
    I need to be able to use these columns as separate displays in addition to being used in a further column as part of a calculation.
    If anyone has an idea how I can output a true zero value as opposed to a null value your help would be appreciated.
    Cheers,
    J

    Hello Julian,
    You could try to use a CASE Statement as I have shown below and test this will the SQL below.  If you use the T0.LineNum without any CASE or CAST the LineNum 0 will show as blank in SAP.
    SELECT
    CASE WHEN T0.LineNum != 0 THEN CAST(T0.LineNum AS VARCHAR(10)) ELSE '0' END AS 'Row Number',
    T0.ItemCode AS 'Item No.', T0.BaseQty AS 'Base Quantity', T0.PlannedQty AS 'Planned Quantity - Rows'  FROM  [dbo\].[WOR1\] T0

  • Simple SQL Query is not using Bitmap index

    Hello to All,
    We are having Oracle9i Database and using it for the datawarehouse purpose.
    I have created the bitmap index on calledinfo column and I am running the following simple query which takes serveral hours to complete:
    select * from ssp.ssp_2006_q4 where calledinfo='799992515f'
    OR
    select calledinfo from ssp.ssp_2006_q4 where calledinfo='799992515f'
    I don't know why it is not using the bitmap index: Can anybody help me here?
    Thanks in Advance
    Hashim

    I know why and everyone that has read Jonathan Lewis' book on the CBO knows why.
    Why? Because the CBO thinks the cost of using your index will be higher than the cost of ignoring it.
    To see what Oracle is thinking run an explain plan using DBMS_XPLAN for create the output and then rerun it with a hint forcing index usage.
    It is a mistake to believe that an index will always make things better. Issues of cardinality, clustering factor, etc. are very important.
    Post the explain plans if you have any questions about what they show:
    http://www.psoug.org/reference/explain_plan.html

  • SQL query output

    Dear friends ,
    I want to view a select query using page by page . Is it possible to do in SQL ?
    suppose here is an example of select query :
    sql > select * from v$session ;
    I want to see the output as page by page .
    waiting for ur kind reply . .. ..

    Hi, (assuming you use Db 10g v.2)
    you should read the chapter "6 Formatting SQL*Plus Reports" of e-book:
    SQL*Plus® User's Guide and Reference
    Release 10.2
    Part Number B14357-01
    and especially the 'break' command.....
    Greetings,
    Sim

  • Probably a simple SQL Query - Newbie

    I want to select entries from a table that has 2 columns where the first column value is contained within the 2 column....Does that make sense?
    The first is a varchar that contains a value for a customer. The second is a varchar that contains a a textual description of a problem the customer has. My problem is that I only want to select the entries in the table where the second column contains a description that includes the first column value.
    eg. I want to select rows that have the following condition:
    column1 has value of "customer1"
    column2 has a value of "an error was reported by customer1 on service blah"
    but not these
    column1 has value of "customer1"
    column2 has a value of "an error was reported by customer2 on service blah"
    This is probably a simple question but I've spent time looking at how to do it and can't seem to manage...any help would be appreciated....Thanks

    Hi Barbara,
    I've never used the CONTAINS operator before. I compared the use in this situation to the other methods and found the others to be FAR less resource intensive, despite working on unindexed columns, as I demonstrate below.
    It would seem that CONTAINS is unsuited to this type of simple query. Can you shed any light on this, from the perspective of somebody who has used it before? Is this type of performance penalty normal? If so, it could seem that CONTAINS is fairly useless next to LIKE.
    [email protected]> desc test;
    Name                                        Null?    Type
    COLUMN1                                              VARCHAR2(20)
    COLUMN2                                              VARCHAR2(100)
    [email protected]> select count(*) from test;
      COUNT(*)
         10000
    Elapsed: 00:00:00.00
    [email protected]> select * from test where instr(column2, column1) > 0;
    10000 rows selected.
    Elapsed: 00:00:00.18
    Execution Plan
       0      SELECT STATEMENT Optimizer=ALL_ROWS (Cost=23 Card=8328 Bytes=532992)
       1    0   TABLE ACCESS (FULL) OF 'TEST' (TABLE) (Cost=23 Card=8328 Bytes=532992)
    Statistics
              5  recursive calls
              0  db block gets
            821  consistent gets
              0  physical reads
              0  redo size
         702263  bytes sent via SQL*Net to client
           7838  bytes received via SQL*Net from client
            668  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
          10000  rows processed
    [email protected]> select * from test where column2 like '%'||column1||'%';
    10000 rows selected.
    Elapsed: 00:00:00.18
    Execution Plan
       0      SELECT STATEMENT Optimizer=ALL_ROWS (Cost=23 Card=8328 Bytes=532992)
       1    0   TABLE ACCESS (FULL) OF 'TEST' (TABLE) (Cost=23 Card=8328 Bytes=532992)
    Statistics
              5  recursive calls
              0  db block gets
            821  consistent gets
              0  physical reads
              0  redo size
         702263  bytes sent via SQL*Net to client
           7838  bytes received via SQL*Net from client
            668  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
          10000  rows processed
    [email protected]> create index testidx on test(column2) indextype is ctxsys.context;
    Index created.
    [email protected]> select * from test where contains(column2, column1) > 0;
    10000 rows selected.
    Elapsed: 00:00:56.80
    Execution Plan
       0      SELECT STATEMENT Optimizer=ALL_ROWS (Cost=25008 Card=4 Bytes=284)
       1    0   TABLE ACCESS (FULL) OF 'TEST' (TABLE) (Cost=25008 Card=4 Bytes=284)
    Statistics
          55201  recursive calls
              0  db block gets
          85857  consistent gets
              0  physical reads
              0  redo size
         702263  bytes sent via SQL*Net to client
           7838  bytes received via SQL*Net from client
            668  SQL*Net roundtrips to/from client
            204  sorts (memory)
              0  sorts (disk)
          10000  rows processedThanks in advance,
    Anthony

  • Help Reqd - on simple sql query

    Hi,
    I have two tables back_temp_ord_hist, temp_ord_hist of similar structures
    create table <table_name>
    order_number          varchar2(10),
    item_number          integer,
    sched_line_number          integer,
    dlv_doc_id               varchar2(10),
    mtrl_mstr_key          integer,
    cust_key               integer,
    wrhse_key               integer,
    sls_ord_type          varchar2(4)
    Now I have inserted same data set in the two tables. (same following three rows in both the tables)
    0009032022     160          2     0091383073          27219     1694     20 ZISO
    0009032022     160          3     0091383073          27219     1694     20 ZISO
    0009032022     160          4     0091383073          27219     1694     20 ZISO
    Then I am trying to use a query like below :
         select
              fact.order_number
              , fact.item_number
              , fact.sched_line_number
              , bk_fact.sched_line_number          as old_sched_line_number     
              , fact.dlv_doc_id
              ,dbms_utility.get_hash_value(fact.order_number||fact.item_number||fact.sched_line_number||fact.dlv_doc_id,1,100) ord_hist_hash
              ,dbms_utility.get_hash_value(bk_fact.order_number||bk_fact.item_number||bk_fact.sched_line_number||bk_fact.dlv_doc_id,1,100) back_ord_hist_hash
              , fact.mtrl_mstr_key
              , bk_fact.mtrl_mstr_key           as old_mtrl_mstr_key
              , fact.cust_key
              , bk_fact.cust_key                as old_cust_key
              , fact.wrhse_key
              , bk_fact.wrhse_key                as old_wrhse_key     
              , fact.sls_ord_type
              , bk_fact.sls_ord_type                as old_sls_ord_type
         from      
              temp_ord_hist fact
         join
         back_temp_ord_hist bk_fact
                   on fact.order_number = bk_fact.order_number
                   and fact.item_number = bk_fact.item_number
                   and fact.sched_line_number <> bk_fact.sched_line_number
                   and fact.dlv_doc_id = bk_fact.dlv_doc_id
                   order by ord_hist_hash, back_ord_hist_hash
    But it is actually it is showing 6 rows. But ideally I want no rows as temp_ord_hist.sched_line_number = back_temp_ord_hist.sched_line_number in all the cases over here.
    Practically it can be different then I want those rows but when it is same why the output is showing 6 rows.
    What I am doing wrong over here?
    Regards,
    Koushik

    Not sure how you are getting 6 rows as the output. I did exactly the same thing that you did and I am getting the only 3 rows as the output:
    see below:
    SQL> create table temp_ord_hist
    2 (
    3 order_number varchar2(10),
    4 item_number integer,
    5 sched_line_number integer,
    6 dlv_doc_id varchar2(10),
    7 mtrl_mstr_key integer,
    8 cust_key integer,
    9 wrhse_key integer,
    10 sls_ord_type varchar2(4)
    11 );
    Table created.
    SQL> create table back_temp_ord_hist
    2 (
    3 order_number varchar2(10),
    4 item_number integer,
    5 sched_line_number integer,
    6 dlv_doc_id varchar2(10),
    7 mtrl_mstr_key integer,
    8 cust_key integer,
    9 wrhse_key integer,
    10 sls_ord_type varchar2(4)
    11 );
    Table created.
    SQL> insert into temp_ord_hist values ('0009032022',160,2,'0091383073',27219,1694,20,'ZISO');
    1 row created.
    SQL> insert into temp_ord_hist values ('0009032022',160,3,'0091383073',27219,1694,20,'ZISO');
    1 row created.
    SQL>
    SQL> insert into temp_ord_hist values ('0009032022',160,4,'0091383073',27219,1694,20,'ZISO');
    1 row created.
    SQL> insert into back_temp_ord_hist values ('0009032022',160,2,'0091383073',27219,1694,20,'ZISO');
    1 row created.
    SQL> insert into back_temp_ord_hist values ('0009032022',160,3,'0091383073',27219,1694,20,'ZISO');
    1 row created.
    SQL> insert into back_temp_ord_hist values ('0009032022',160,4,'0091383073',27219,1694,20,'ZISO');
    1 row created.
    SQL> select
    2 fact.order_number
    3 , fact.item_number
    4 , fact.sched_line_number
    5 , bk_fact.sched_line_number as old_sched_line_number
    6 , fact.dlv_doc_id
    7 ,dbms_utility.get_hash_value(fact.order_number||fact.item_number||fact.sched_line_number||fact.dlv_doc_id,1,100) ord_hist_hash
    8 ,dbms_utility.get_hash_value(bk_fact.order_number||bk_fact.item_number||bk_fact.sched_line_number||bk_fact.dlv_doc_id,1,100) back_ord_hist_hash
    9 , fact.mtrl_mstr_key
    10 , bk_fact.mtrl_mstr_key as old_mtrl_mstr_key
    11 , fact.cust_key
    12 , bk_fact.cust_key as old_cust_key
    13 , fact.wrhse_key
    14 , bk_fact.wrhse_key as old_wrhse_key
    15 , fact.sls_ord_type
    16 , bk_fact.sls_ord_type as old_sls_ord_type
    17 from
    18 temp_ord_hist fact
    19 join
    20 back_temp_ord_hist bk_fact
    21 on fact.order_number = bk_fact.order_number
    22 and fact.item_number = bk_fact.item_number
    23 and fact.sched_line_number = bk_fact.sched_line_number
    24 and fact.dlv_doc_id = bk_fact.dlv_doc_id
    25 order by ord_hist_hash, back_ord_hist_hash
    26
    SQL> /
    0009032022 160 3 3 0091383073 4 4 27219 27219 1694 1694 20 20 ZISO ZISO
    0009032022 160 4 4 0091383073 55 55 27219 27219 1694 1694 20 20 ZISO ZISO
    0009032022 160 2 2 0091383073 100 100 27219 27219 1694 1694 20 20 ZISO ZISO
    SQL>

  • Your estimated performance of a very simple SQL query

    Hi there..
    Sometimes it seems hard to find answers for the most simple questions so I hope you can help me and be overbearing ;)
    I am going to have a table with a few million records in it, 30-40 columns of which 80% has data, indexes on maybe 10 columns (certainly the columns I am querying), less than ten thousand new records a day with a variety of different column values and using Oracle 10 or 11.
    I am going to be running a single SQL SELECT statement quite regularily against these records to retrieve all records whose value of a single column is the same (and specified in my WHERE clause)
    It will be a query like this; SELECT * FROM person where city = 'Amsterdam' AND
    The column 'city' will have a simple index on it. 4-8 records will have the same value (e.g. there will only be up to 8 rows where city is 'Amsterdam' in the above example) which means that with 5 million records I will probably have between 625,000 and 1,250,000 "sets" that I am querying and retrieving per SQL. Thed atatype could be varchar or number - not sure yet.
    I will retrieve the same data a lot but generally also access all the other data on a regular basis.
    How should I expect this to perform? Always fast I imagine because will there will be any table scans do we think? I don't have to think about partitioning of too regular statistic calculation or anything? Anything to watch out for?
    Any feedback would be greatly appreciated.
    Thanks a lot in advance.
    Daniel

    It's impossible to tell without seeing a true structure and indexes etc.
    It sounds ok at a first read. High selectivity, low cardinality, low skewing. Obviously, ensuring stats are up to date on a reasonably regular basis is a good idea, especially with 10,000+ records added daily. I would expect it to perform ok.

  • Execute simple SQL query on Java

    Hello,
    I am a newbie on ADF, I am a web developer used to work with EJBs, WebServices, Servlets and this stuff... But now I am on a project that uses ADF.
    My opinion, I don´t like this kind of development, drag and drop, I prefer to code on :) but, I need to work.
    I am developing a utility class that needs to run some SQL statements and send an email.
    I tried to work with the conventional @Resource (name...) Datasource ds; and did not worked, because it does not injected the object.
    I tried to create a java implementation of my application module, instanciate it and get a ViewObject that I created to do a select statement, and the ViewObject comes null...
    I just wanna do a simple query... just it, using simple java for web I would have already done it... How is the best way to do it?
    Thanks.

    ApplicationModuleImpl am = getApplicationModuleByName("AppModuleDataControl")
    DBTransaction dbt = am.getDBTransaction();
    CallableStatement cs = dbt.createCallableStatement(query, .......
    You can get ApplicationModule by this code. In this case there should be some binding related to this AM in pageDef. Input parameter "name" should be datacontrol name;
    public static ApplicationModuleImpl getApplicationModuleByName(String name) {
    try {
    BindingContext bc = (BindingContext)resolveExpression("#{data}");
    DCDataControl dc = bc.findDataControl(name);
    return (ApplicationModuleImpl)dc.getDataProvider();
    } catch (Exception e) {
    l.error(e);
    return null;
    public static Object resolveExpression(String expression) {
    l.debug("expression: " + expression);
    FacesContext fctx = FacesContext.getCurrentInstance();
    ELContext elctx = fctx.getELContext();
    ExpressionFactory exprFactory =
    fctx.getApplication().getExpressionFactory();
    ValueExpression ve =
    exprFactory.createValueExpression(elctx, expression, Object.class);
    Object value = ve.getValue(elctx);
    return value;
    }

Maybe you are looking for

  • Java connect to SAP R/3

    I would seek for opinion on the problem that we're currently encountered related to java We are developing an intranet system using Java and Borland Enterprise Server as an application/web server and also connecting to SAP R/3 database to get certain

  • Logical Standby Database - Materialized Views

    Hi, Are materialized views applied from the primary to the standby? They are not mentioned in the 9i documentation as being excluded, but I cannot get a simple one to apply. The standby database log file claims that it is running the DDL, but I do no

  • WCS 7.0.164.0 Report by vendor (device type)

    WCS 7.0.164.0 I have been asked to produce a client's report that shows all different vendors (devices type). We have about 10000 users in our system on about 3000 APs (light version) I created a client summary report but encountered some limitations

  • [SOLVED] Awesome 3.5 using english keyboard layout instead of Xorg's

    Keyboard layout was OK on 3.4. For 3.5 and git version, Awesome defaults to english layout. Calling awesome.restart() (e.g. with SUPER+SHIFT+R) will correctly set the layout according to Xorg config. That's quite annoying indeed. Only Awesome is affe

  • Omit picture on User Business Card

    Hi all Does any of you know if it is possible to omit the default picture (nophoto.jpg) on the UserBusinessCard through KM configuration? I know that I can just make a white .jpg-picture and overwrite the existing nophoto.jpg in com.sap.netweaver.kmc