Query on the multiple data access

Hi !
I have to display data from 4 tables (on a single screen) and I should be able to query based on any field on the screen.
This is what I have done on the base datablock properties:
1. QUERY DATA SOURCE TYPE: from clause query
2. QUERY DATA SOURCE NAME: SELECT table1_fields, table2_fields, ...
FROM table1, table2, ...
3. WHERE : Join condition
4. DML DATA TARGET TYPE: table
5. DML DATA TARGET NAME: the base table name for the block.
Now the question is that
1. How do I define the elements in the blocks? Meaning the items that are not a part of the base tables but need to be queried will be having database item as NO (I presume) but in that case will the from condition of the block suffice for data population ?
2. What will be there in the Query Data Source Columns in the block properties ?
Please reply at the earliest convenient time...
Regards,
Shobhit Kumar
null

Hi.
Do the following:
- What you have done so far is correct.
- All the fields on the query block should be Database Item = Yes.
- For the fields that not belong to "DML Data Target Name" set ther property "Query Only" to Yes.
null

Similar Messages

  • Adhoc Query Requirement with Multiple Data Source

    Hi All,
    I have a Adhoc Query Requirement with Multiple Data Source. Is there any way to achive it. Other than Resultant set and bring into Model.
    Thanks
    SS

    You can compare stuff in the EL, but I don't think this is what you need.
    You can just use Java code in the backing bean class for all the business logic. You can use DAO classes for database access logic. Finally for displaying you can use the JSF tags such as h:outputText.

  • Query problem with multiple date fields.

    I need to select the greatest date from six different fields in each record and identify from which column was selected.
    date01 date02 date03 date04 date05 date06
    010190 010107 010190 010190 010190 010190
    010190 010190 010105 010190 010190 010190
    010103 010190 010190 010190 010190 010190
    1)if greatest is in date01 then S = 1
    2)if greatest is in date02 then S = 2
    3)if greatest is in date03 then S = 3
    4)if greatest is in date04 then S = 4
    5)if greatest is in date05 then S = 5
    6)if greatest is in date06 then S = 5
    Do you have any idea on how to acomplish this?
    Thanks

    Another way (won't work for null dates):
    with
    the_data as
    (select to_date('01011990','DDMMYYYY') col1,to_date('01012007','DDMMYYYY') col2,to_date('01011990','DDMMYYYY') col3,
            to_date('01011990','DDMMYYYY') col4,to_date('01011990','DDMMYYYY') col5,to_date('01011990','DDMMYYYY') col6
        from dual union all
    select to_date('01011990','DDMMYYYY'),to_date('01011990','DDMMYYYY'),to_date('01012005','DDMMYYYY'),
            to_date('01011990','DDMMYYYY'),to_date('01011990','DDMMYYYY'),to_date('01012005','DDMMYYYY')
        from dual union all
    select to_date('01012003','DDMMYYYY'),to_date('01011990','DDMMYYYY'),to_date('01012003','DDMMYYYY'),
            to_date('01011990','DDMMYYYY'),to_date('01012003','DDMMYYYY'),to_date('01011990','DDMMYYYY')
        from dual
    the_setup as
    (select rownum the_row,col1,col2,col3,col4,col5,col6,greatest(col1,col2,col3,col4,col5,col6) the_greatest,
            to_char(col1,'DDMMYYYY') || to_char(col2,'DDMMYYYY') || to_char(col3,'DDMMYYYY') ||
            to_char(col4,'DDMMYYYY') || to_char(col5,'DDMMYYYY') || to_char(col6,'DDMMYYYY') dates
       from the_data
    the_columns as
    (select the_row,
            max(decode(position,1,'1,')) || max(decode(position,2,'2,')) || max(decode(position,3,'3,')) ||
            max(decode(position,4,'4,')) || max(decode(position,5,'5,')) || max(decode(position,6,'6,')) the_cols
       from (select distinct the_row,level position
               from the_setup
              where substr(dates,8 * (level - 1) + 1,8) = the_greatest
             connect by level <= 6
    group by the_row
    select col1,col2,col3,col4,col5,col6,the_greatest,rtrim(the_cols,',') the_columns
      from the_setup s,the_columns c
    where s.the_row = c.the_row
    order by s.the_row
    ==========================================================================================================
    COL1       | COL2       | COL3       | COL4       | COL5       | COL6       | THE_GREATEST | THE_COLUMNS
    ==========================================================================================================
    01.01.1990 | 01.01.2007 | 01.01.1990 | 01.01.1990 | 01.01.1990 | 01.01.1990 | 01.01.2007   | 2
    01.01.1990 | 01.01.1990 | 01.01.2005 | 01.01.1990 | 01.01.1990 | 01.01.2005 | 01.01.2005   | 3,6
    01.01.2003 | 01.01.1990 | 01.01.2003 | 01.01.1990 | 01.01.2003 | 01.01.1990 | 01.01.2003   | 1,3,5Regards
    Etbin

  • Need a sql query to get multiple dates in rows

    Hi All,
    i need a query to get dates for last 7 days and each dates should be in one row...
    but select sysdate from dual..gives one row...
    Expexcted Output
    Dates:
    01-oct-2013
    30-sep-2013
    29-sep-2013
    28-sep-2013
    27-sep-2013
    26-sep-2013

    Hi,
    Do you mean that you want all 7 dates together on 1 row?
    Here's one way:
    SELECT LISTAGG ( TO_CHAR ( SYSDATE + 1 - LEVEL
                              , 'DD-Mon-YYYY'
                    ) WITHIN GROUP (ORDER BY LEVEL)    AS txt
    FROM    dual
    CONNECT BY LEVEL <= 7
    This is an example of String Aggregation, that is, taking a column on multiple rows, and concatenating all the values (however many htere happen to be) into 1 big string column 1 row.
    Like everything else, exactly how to do it depends on your Oracle version.
    For more on String Aggregation, including differetn techniques for different versions, see http://www.oracle-base.com/articles/10g/StringAggregationTechniques.php
    Message was edited by: FrankKulash
    Sorry, I mis-read the question.

  • How to execute a update query when the particular date changes

    hi all,
    i am using date base 11.1.0.6.0,
    i am trying a small update query it should fire when particular date changes in year.
    i think for trigger but i didn't get how to execute it.
    Regards,
    Pavan

    Hi, Pavan,
    Use dbms_scheduler to run a procedure at a given time (or at repeatedly, at given times).
    A trigger is good for re-acting to certain actions in the database, someone INSERTing a row in a given table, for example. Nothing will necessarily be happening when you want your procedure to run, so a trigger is not good in this case.

  • How to restrict the Master data access for HR reports .???

    Dear SAP-HR Experts .
    I am facing a problem regarding HR reports which is appearing from HR Master Data .
    we want to restrict that a employee whose payroll area is AB (say) can only able to access the out of reoprt for payroll area AB only He/She not allowed to access the data for anyother payroll area .
    What help is required from Basis side , regarding Role / Profile etc .?
    How do we restrict this thing .
    PLease help me out .
    Kind regards : rajneesh
    Edited by: rajneesh mittal on Jul 31, 2008 1:14 PM

    Hi rajneesh,
    In the IT0001 there is a field called organizational key.
    If you're not using it for any other purpose, make it filled with "payroll area" value through customization.
    Then through PFCG -> Change authorizations, you can limit the access authorizations of roles based on payroll area (using P_ORGIN Authorization object).
    If you have further questions pls feel free to ask.
    Regards,
    Dilek

  • Essbase administration service. The SQL data access source is greyed out

    Env: EAS 11g Oracle 10g database
    Hi,
    After i tried to install EAS and try to create a rule file, I find out that I am unable to select the datasource from "SQL data sources" field, which has been greyed out. However, I am able to make the connection in another environment that use the same settings. This is a replica of the system.
    1) Is there something with the connection. If yes, what file(s) I need to check and any other things that I need to check. It could be something with the jdbc.ini file perhaps. But when I try to check this ini file, it appears the same with the one that works in the other environment
    kindly need your help
    Rgds,
    Raymond

    To configure data sources on UNIX:
    1.Open the $EPM_ORACLE_HOME/common/ODBC/Merant/x.x/odbc.ini file and add a data source description.
    2.Copy the $EPM_ORACLE_HOME/common/ODBC/Merant/x.x/odbc.ini to $ESSBASEPATH/bin/.odbc.ini.
    3.Create a symbolic link to the $ESSBASEPATH/bin/.odbc.ini from the UNIX user home directory:
    ln -s $EPM_ORACLE_HOME/common/ODBC/Merant/x.x/odbc.ini /home/myfolder/.odbc.ini
    4.Verify that the odbc.ini file in the user home directory matches the odbc.ini file in EPM_ORACLE_HOME/common/ODBC/Merant/x.x.
    If the files do not match, repeat step1 through step3
    The ODBC-64 folder is used when the Linux is a 64 bit.
    Check if these are the steps you followed to create the Data Source.
    The connection to the DSN created can be checked by below steps in Unix..
    [essdev@dshypdev bin]$ pwd
    essdev/hyperion/products/Essbase/eis/server/bin
    [essdev@dshypdev bin]$ ./odbcconfig
    Using the following Environment...
    Env HYPERION_HOME=/essdev/hyperion
    Env TDODBC=. (for Teradata only)
    odbc.ini file name=/essdev/hyperion/common/ODBC-64/Merant/5.2/odbc.ini
    Database Driver Names:
    Db2=/essdev/hyperion/common/ODBC/Merant/5.1/lib/ARdb221.so
    Oracle=/essdev/hyperion/common/ODBC/Merant/5.1/lib/ARora21.so
    Sybase=/essdev/hyperion/common/ODBC/Merant/5.1/lib/ARase21.so
    Informix=/essdev/hyperion/common/ODBC/Merant/5.1/lib/ARifcl21.so
    Teradata=./drivers/tdata.so
    SQL Server=/essdev/hyperion/common/ODBC/Merant/5.1/lib/ARmsss21.so
    ODBC.ini Configuring Utility
    1. List
    2. Add
    3. Delete
    4. Test
    5. Exit
    Select option 4 to test the connection

  • Query about the forum date

    When I browse this forum as a guest, today's date appears as "Mar 2" (and that was yesterday). When I log in, however, the date is given as (the correct) March 3.
    What's up with that?

    When you're browsing as a guest, click on Guest Settings and change the time zone. This information is stored as a browser cookie and not on the server; therefore, it will need to be repeated for each cookie database instance you use. The settings of an account holder are stored on the server.
    (41313)

  • HOWTO: Use the Spring data access methods together with the WebRowSet class

    With the WebRowSet class I can easily iterate over a ResultSet and produce some XML using the code below.
    Class.forName("oracle.jdbc.driver.OracleDriver");
    Connection connection
    = DriverManager.getConnection("");
    Statement statement = connection.createStatement();
    ResultSet resultSet = statement.executeQuery("SELECT SYSDATE FROM DUAL");
    WebRowSet webRowSet = new WebRowSetImpl();
    webRowSet.populate(resultSet);
    statement.close();
    connection.close();
    webRowSet.writeXml(new FileOutputStream("C:\\SYSDATE.xml"));
    So, how would I use the simplified Spring methods to do the same thing? The WebRowSet.populate method only supports a ResultSet object. The Spring framework only returns an SqlRowSet object that is not easily cast to the ResultSet, etc.
    Thanks for your help.
    Edited by: mrmeth0d on Jan 3, 2008 2:02 PM

    So, how would I use the simplified Spring methods to do the same thing? The WebRowSet.populate method only supports a ResultSet object. The Spring framework only returns an SqlRowSet object that is not easily cast to the ResultSet, etc.
    Cast Spring's SqlRowSet to ResultSet? Impossible. It's an interface that does not extend java.sql.ResultSet.
    javax.sql.WebRowSet is an interface that extends java.sql.ResultSet.
    Spring does have a concrete class ResultSetWrappingSqlRowSet whose constructor can take a java.sql.ResultSet.
    So I think your solution is to instantiate a new ResultSetWrappingSqlRowSet, passing it your javax.sql.rowset.WebRowSet, and return that wherever Spring wants to return a SqlRowSet.
    %

  • Query result shows the same data twice

    Hello All,
    I've created UDFs like Supplier Name, Supplier Address, and (Excise Details like)Supplier ECC No,
    Supplier Range.
    And I've created Query for Supplier Name and Supplier Address, and I assigned to FMS, Its working Correctly.
    I've created Query for Supplier ECC No. the Query is,
    SELECT  T0.[ECCNo],T1.[CardName]
    FROM CRD7 T0  INNER JOIN OCRD T1 ON T0.CardCode = T1.CardCode
    WHERE T0.[ECCNo]  Like  '[%]'
    I saved the Query, and assigned to FMS.
    At this stage (i.e. Query for Supplier ECC No.) the above Query showing the same data twice.
    Please suggest to rectify the problem.
    Thanks,
    Pratheeviraj

    You can get rid of the duplicates by changing the query to
    SELECT DISTINCT T0.ECCNo,T1.CardName
    FROM CRD7 T0 INNER JOIN OCRD T1 ON T0.CardCode = T1.CardCode
    WHERE T0.ECCNo Like '[%]'
    But it is always worth understanding why you are getting multiple records to check that you are getting back what you want.  I think you may be seeing this because CRD7 can have multiple records for a business partner - maybe one for each of 'pay-to' and 'ship-to' address?

  • Bursting with multiple data sources

    Hello all,
    I am working in a retail environment and we are building reports for the stores. There are several reports and they all receive the same reports. We are using BIP Entreprise with the bursting feature and it works very well.
    The problem is that there are too many reports and we would like to combine all reports of the same store within the same PDF. We use the multiple data source feature and was able to concatenate all reports together.
    Using this new report and template, we can not make the bursting functionality to work properly: the bursted report do not contain all the required report components.
    For example, I have 2 queries A and B each producing reports for 3 stores: 2, 4 and 5. Without bursting, the output is as is:
    Query A - Store 2
    Query A - Store 4
    Query A - Store 5
    Query B - Store 2
    Query B - Store 4
    Query B - Store 5
    With bursting into a file using the store number, I get the following:
    File 1 - Store 2 - Query A
    File 2 - Store 4 - Query A
    File 3 - Store 5 - Query A
    + Store 2 - Query B
    + Store 4 - Query B
    + Store 5 - Query B
    I would like to have the following output:
    File 1 - Store 2 - Query A
    + Store 2 - Query B
    File 2 - Store 4 - Query A
    + Store 4 - Query B
    File 3 - Store 5 - Query A
    + Store 5 - Query B
    The main question is: can this be done using BI Pub Enterprise? We using version 10.1.3.3.2
    If it is, can you provide me with help on how to configure either/or the requests and template to accomplish this task?
    I create an SR and Oracle Support does not have an answser and suggested that somebody in the Forum might help.
    Thanks in advance,
    Minh

    I would like to have the following output:
    File 1 - Store 2 - Query A + Store 2 - Query B
    File 2 - Store 4 - Query A + Store 4 - Query B
    File 3 - Store 5 - Query A + Store 5 - Query B
    the bursting level should be give at
    File 1 - Store 2 - Query A + Store 2 - Query B
    so the tag in the xml has to be split by common to these three rows.
    since the data is coming from the diff query, and the data is not going to be under single tag.
    you cannot burst it using concatenated data source.
    But you can do it, using the datatemplate, and link the query and get the data for each file under a single query,
    select distinct store_name from all-stores
    select * from query1 where store name = :store_name === 1st query
    select * from query2 where store name = :store_name === 2nd query
    define the datastructure the way you wanted,
    the xml will contain something like this
    <stores>
    <store> </store> - for store 2
    <store> </store> - for store 3
    <store> </store> - for store 4
    <store> </store> - for store 5
    <stores>
    now you can burst it at store level.

  • Data Access Error in OIM Scheduler

    I have a scheduler task in OIM,which fetches the "*Manager Employee ID*" custom field from OIM and if that is not empty then updates the Manager ID for that user.
    The scheduler task when run throws an Data Access error, every time it starts and closes.
    The same Scheduler code is working fine in the UAT environment successfully, but throws the error "Data Access Error" in the Prod environment.
    In the code there is a catch block for catching the "*tcDataSetException*" and this is where the error is thrown from.
    When i looked in to the code i found that the "*tcUserOperationsIntf*" was initialized but not closed in the finally block. Will closing the "tcUserOperationsIntf" slove this problem or am i missing something ?
    When is the Data Access Error occur??? There are other schedulers that are running fine in the prod environment.
    Any help in this regard would be really helpful to me.
    Thanks

    I am getting the UDF using the Query.
    I am placing the piece of code that i am using for your reference
    try {
         //Get Users for who have got there manager empid and manager empid not set to null
         String msQuery1 = "select usr_key,usr_login, "+udf_Manager_EMPID+" from usr where "+udf_Manager_EMPID+" is not null " ;
              tcDataSet getMemberUsers = new tcDataSet();
              getMemberUsers.setQuery(getDataBase(), msQuery1);
              getMemberUsers.executeQuery();
              for (int i=0;i<getMemberUsers.getTotalRowCount();i++)
                   getMemberUsers.goToRow(i);
                   String managerEmpId = getMemberUsers.getString(udf_Manager_EMPID);
                   logger.debug("the manager emp id that we get for the user is "+managerEmpId );
                   long userKey = getMemberUsers.getLong("usr_key");
                   String userid = getMemberUsers.getString("usr_login");//Users.User ID
                   logger.debug("the userkey that we get for the user is "+userKey );
                   String msQuery2 = "select usr_key from usr where "+udf_EmployeeID+"="+ managerEmpId ;
                   tcDataSet getMemberUser = new tcDataSet();
                        getMemberUser.setQuery(getDataBase(), msQuery2);
                        getMemberUser.executeQuery();
                        long userassociatedwithmgrid=0;
                        for(int j=0;j<getMemberUser.getTotalRowCount();j++){
                        getMemberUser.goToRow(j);
                             userassociatedwithmgrid = getMemberUser.getLong("usr_key");
                             logger.debug("the user id that we get for the user's manager is "+userassociatedwithmgrid );
                             updateusermanager(userid,userassociatedwithmgrid);
    } catch (tcDataSetException e)
              logger.error(e.getMessage() + " DataSetException");
    In the above code the error is being thrown from the catch block as Data Access Error
    As i told earlier this piece of code works fine in UAT but does not work in prod and throw the above error. The error is thrown from the line msQuery2
    Thanks

  • How to load the existing data from the databse in the CMP entity bean?

    hello
    my problem is as follows--
    i am creating a CMP entity bean.in these beans client create the data instances using create() function.
    now a entity bean will be created for the newly created data and it's EJBObject will also be formed.
    now we will be able to perform finder methods over them.
    remember these data has been newly created in the database.
    but now if i want to perform the finder methods on the
    existing data in the database( i don't need to use create() fn as i am not "creating" the data.). how will i perform the query over the existing data.
    basically i have to make a CMP bean to extract the data corresponding to a particular condition , from the database table. i don't want to create the data in the database but just find out what data satisfies my condition.
    thanking you
    Prashant

    you have to use findByXXX methods. depending on your appserver you may have to declare them (and eventually the query you want to be used) in the vendor specific deploiement descriptor.
    (e.g. using jboss i don't remember having explicitly declare the findBySomeField method - where someField is a persistent field - in the dd, whereas with bas all finder methods have to be explicitly declared)
    [note that obviously these methods have to be present in your home interface]

  • How to Enter the existing data  in the entity beans?

    hello
    my problem is as follows--
    i am creating a CMP entity bean.in these beans client create the data instances using create() function.
    now a entity bean will be created for the newly created data and it's EJBObject will also be formed.
    now we will be able to perform finder methods over them.
    remember these data has been newly created in the database.
    but now if i want to perform the finder methods on the
    existing data in the database( i don't need to use create() fn as i am not "creating" the data.). how will i perform the query over the existing data.
    basically i have to make a CMP bean to extract the data corresponding to a particular condition , from the database table. i don't want to create the data in the database but just find out what data satisfies my condition.
    thanking you
    Prashant

    All I say here is based on limited knowledge on 1.1 ejb specification. There could be improvements on 2.0 spec. 1.1 specification does not formaly provide how the finders should work for container managed beans. It leaves it at the hand of bean providers. Currently bean providers describes the finers in a description of the Entity Bean. Refer to documentation accompanied with application server you are using.
    I attach the famous bank account example in weblogic server.
    <finder-list>
    <finder>
    <method-name>findBigAccounts</method-name>
    <method-params>
    <method-param>double</method-param>
    </method-params>
    <finder-query><![CDATA[(> balance $0)]]></finder-query>
    </finder>
    </finder-list>
    Method definition in Home inteface is
    public Enumeration findBigAccounts(double balanceGreaterThan)
    throws FinderException, RemoteException;

  • Issue while Installing Oracle Data Access Software for Windows

    All,
    Iam getting the following error while installing Oracle Data Access Software for windows. Iam installing in WindowsXP, with Oracle 9i release 9.2.0.7.0 DB and client in the same Box.
    It shows
    The Specified Key key was not found while trying to GetValue
    * Stop installation of all Products
    * Stop installtion of this componenent only.
    Kindly let me know why this error is showing up.
    Regards
    Ramesh

    Most probably you have hit this issue:
    "If you have more than one Oracle Home installed on the same machine (e.g. Oracle8i client and Oracle9i Release 2 client), use the Oracle Home Selector to run your applications with Oracle9i Release 2 client. "
    As documented on the Oracle Data Access Software for Windows. Release 9.2.0.4.0
    ~ Madrid.

Maybe you are looking for

  • Migration ***'t works with Thunderbolt to RJ45 Adapter?

    Just wanted to confirm that the latest version of Migration Assistant will work with a Thunderbolt to RJ45 adapter. We're upgrading an "old" MBP 4,1 to the latest MBP. Would it also work with the Thunderbolt to Firewire adapter?  Which would be faste

  • Another XAV-72BT BUG

    I've checked the format of the JPG files that don't display when playing the MP3 files in the same folder. None of them use the progressive JPG format. And these same JPG files do display if I select 'Images' instead of 'Audio' from the XAV72bt user

  • How to create a Finish Schedule List with InDesign?

    We create Room x Room selection catalogs with images and brief descriptions for architectural & Interior design projectsl.  How can I export the text description into a Finish Schedule list(spreadsheet) for contractors to order materials from this in

  • CS4 error 148:3

    Have CS4 running on windows xp. CS4 was running great until about 2 weeks ago when I started to get the error notice 148:3 which states; This product has encounted a problem which requires you to restart your computer before it can be relaunched. If

  • Certification expired? @ HelloWorld-app.xml in tutorial pdf

    Hi, everyone. Im just a student passed by and interesting in Flex app (however i dont have a good fundamental about web ^^") I tries to follow the pdf file, devappsflex. Using Notepad++ as texteditor and FlexSDK in Vista sp1 64bit. HelloWorld.mxml is