Is it possible to filter the nested table result set of table column

Hi
Create or replace type address_record
as object
( address_no number,
address_name varchar2,
address_startDate date,
address_expiryDate date
create or replace type address_rec_tab
as table of address_record;
Create table employee
(emp_no number,
emp_name varchar2,
adresses address_rec_tab
1st approach
==========
<pre>
select
emp.emp_no,
emp.emp_name,
emp.addresses
from employee emp,
table(*emp.addresses*) add
where add.address_expiryDate >=sysdate
</pre>
In the above example my SQL query address collection object is not returning filtered or current address list.
I suppose this is due to fact taht my where clause is not attached to the nested table.
Through my reading I gather that I can only use the following query to filter the address collection.
2nd approach
==========
<pre>
select
emp.emp_no,
emp.emp_name
cursor(select address_no,
address_name,
address_startDate,
address_expiryDate
from employee emp,
table (*emp.addresses*) add
where add.address_expiry_date >=sysdate)
from employee emp,
table (*emp.addresses*) add
where add.address_expiry_date >=sysdate) -- probably this redundent
</pre>
But this approch forces me to rebuild addresses collection object.
I was wondering anybody can suggest me a way so that 1st approach works? I do not have to rebuild collection object in this way.
Thanks for your help in advance
Regards
Charan

Create statements have been slightly modified;
Create or replace type address_record as object
( address_no          number,
  address_name        varchar2(20),
  address_startDate   date,
  address_expiryDate  date
create or replace type address_rec_tab as table of address_record;
Create table employee
(emp_no number,
emp_name varchar2(20),
add_list address_rec_tab
nested table add_list store as a_list
insert into employee values (1, 'KMCHARAN', address_rec_tab ( address_record(1, 'NORTH POLE', trunc(sysdate-1), trunc(sysdate+10) ) ,
                                                              address_record(1, 'SOUTH_POLE', trunc(sysdate-1), trunc(sysdate+10) )
insert into employee values (2, 'ME', address_rec_tab ( address_record(2, 'EAST', trunc(sysdate-2), trunc(sysdate+12) ) ,
                                                        address_record(2, 'WEST', trunc(sysdate-2), trunc(sysdate+12) )
SQL> l
  1  select *
  2  from employee
  3      ,table(add_list) a
  4* where a.Address_StartDate = trunc(sysdate-1)
SQL> /
    EMP_NO EMP_NAME
ADD_LIST(ADDRESS_NO, ADDRESS_NAME, ADDRESS_STARTDATE, ADDRESS_EXPIRYDATE)
ADDRESS_NO ADDRESS_NAME         ADDRESS_S ADDRESS_E
         1 KMCHARAN
ADDRESS_REC_TAB(ADDRESS_RECORD(1, 'NORTH POLE', '08-APR-10', '19-APR-10'), ADDRESS_RECORD(1, 'SOUTH_
         1 NORTH POLE           08-APR-10 19-APR-10
         1 KMCHARAN
ADDRESS_REC_TAB(ADDRESS_RECORD(1, 'NORTH POLE', '08-APR-10', '19-APR-10'), ADDRESS_RECORD(1, 'SOUTH_
         1 SOUTH_POLE           08-APR-10 19-APR-10

Similar Messages

  • How to filter the Rest Api data based on Taxanomy columns

    Hi Everyone,
    We are using SharePoint2010 Standard Edition.
    I wanted get the library details through REST Api. I am using as below:
    https://SiteUrl/_vti_bin/listdata.svc/Documents?$filter=Title eq 'SharePointDoc'
    Here I am able to get the info regarding "SharePointDoc". But when I am trying to get the details from Taxonomy filter, it didn't.
    Can anyone please tell me how can we filter based on Taxanomy fields.
    Thanks in Advance
    Krishnasandeep

    Hi,
    I understand that you wanted to filter the Rest Api data based on Taxanomy columns.
    Per my knowledge, in SharePoint 2010 , not all types of column are available via REST, most annoyingly managed metadata columns are amongst this group of unsupported column types.
    However, in SharePoint 2013, we can filter list items based on taxonomy (managed metadata) columns.
    Taxonomy fields can be now called via REST API using CAML query in REST calls.
    Here is a great blog for your reference:
    http://www.cleverworkarounds.com/2013/09/23/how-to-filter-on-a-managed-metadata-column-via-rest-in-sharepoint-2013/comment-page-1/
    You’d better to change the REST calls and the CAML query to check whether it works in SharePoint 2010.
    More information:
    http://platinumdogs.me/2013/03/14/sharepoint-adventures-with-the-rest-api-part-1/
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • What is the use of delet set up table in lo **** pit, exactly what happenda

    what is the use of delete set up table in lo **** pit, exactly what happened if we do the process, is all tables will lose their data which r available in functional module,
    Why i'm asking this, because we assign functional module in LBWG.
    plz .......
    thanx
    vidhu

    HI Vidhu,
    Initially we don't delete the setup tables but when we do change in extract structure we go for it. We r changing the extract structure right, that means there are some newly added fields in that which r not before. So to get the required data (i.e.; the data which is required is taken and to avoid redundancy) we delete n then fill the setup tables.
    To refresh the statistical data. The extraction set up reads the dataset that you want to process such as, customers orders with the tables like VBAK, VBAP) & fills the relevant communication structure with the data. The data is stored in cluster tables from where it is read when the initialization is run. It is important that during initialization phase, no one generates or modifies application data, at least until the tables can be set up.

  • Base tables to set up tables

    Hi,
          how we extract data from base tables to set up tables? n what is multidimentional modeling?
       thanks in advance
         charu

    in LO extraction you run transaction oli*bw to post the data from the application tables to the setup tables (e.g. run oli7bw to fill the setup tables for appl. 11 which is sales orders). In case of generic extraction you cannot use setup tables. For this type of extraction you use views on database tables or the tables directly, you can use your own function modules and you can just grap some texts from domain fixed values.
    regards
    Siggi

  • Is it possible to filter the data in a rule group ?

    Hi !
    I'm using 3 rule groups in a sales transformation to differentiate commands, bills, and deliveries.
    I would like to know if it is possible to filter for each rule group the data by BWVORG for example ?
    Thx in advance .
    Guillaume

    As per my understanding filter at rule group is not possible.
    You can use the same at the start routine.

  • Is it possible to increase the nested layer group limit on Photoshop CS4

    Hi all,
    Does anyone know if it is possible to increase the limit on nested layer groups in Photoshop CS4. To do a test, I made a group with a blank layer inside, then duplicated this group several times and nested them within each other. Once I have nested groups (5 deep) I can't nest any more.
    This is quite frustrating as I'm sure I could cope with a just two or three more levels of depth.
    Thanks.

    Thanks for the reply.
    That's rather annoying. I guess I will have to live with it for now. :-(

  • How can I filter the rows displayed on an ADF Table ? pls help urgent..

    Hi All,
    I have a page with ADF readonly table, based on who is logging in I want to filter the rows to be displayed when the page is firstly loaded. This page is called from the main menu.
    I have created a custom method in the Application Module Impl :
    public void setInvoiceFilter () {
    ViewObject vo = findViewObject("BrowseInvoice1");
    ViewCriteria vc = vo.createViewCriteria();
    ViewCriteriaRow vcr1 = vc.createViewCriteriaRow();
    vcr1.setAttribute("Userid","xxxx");
    vc.add(vcr1);
    vo.applyViewCriteria(vc);
    vo.executeQuery();
    The question is : where and how should I call this method ?
    is this a correct approach ?
    Thank you very much for your help,
    xtanto

    I assume you're talking about a JSF application.
    I think you should be able to do this in the constructor of a backing bean.
    1) Add an operation binding, bound to your service method, to the page's pageDefinition.
    2) On the JSF page flow Overview tab, add a managed property to the backing bean. Call it, say, myMethod, give it type oracle.bindings.OperationBinding, and give it the value #{bindings.nameOfYourOperationBinding}
    3) Add a myMethod field of type OperationBinding, with getter and setter, to your backing bean class.
    4) In the backing bean class's constructor, add code like:
    myMethod.execute();This will execute the method every time the page is loaded.
    Now, if you want to execute the method only the first time the page is loaded, it's a bit trickier. You need to set, and use, a session variable:
    Map sessionVars = FacesContext.getCurrentInstance().getExternalContext().getSessionMap();
    if (sessionVars.get("hereBefore") == null)
      myMethod.execute();
      sessionVars.put("hereBefore", "true");
    }

  • Not possible to scroll the menu without lagging - Set Up a Repair service is not working

    Hi,
    It is not possible to scroll the menu without lagging.
    The latest version has been restored but nothing.
    I think the touch screen is having some problems.
    I wanted to use the Set Up a Repair / Send In for service but it seems that the application form doesn't working.
    As soon as push the Continue button, nothing happens.
    Is there anybody from Apple who can check this issue please?
    Thank You.
    Anmary

    Restoring a phone from a backup will put the device back to the state it was when the backup took place, i.e. all info that you had on that phone before using the backup will be gone.
    You could try to restore the phone, which will back up the actual data on the phone, including the passcode, and use this backup to set up a new phone with. The passcode will still be the same, because it is  part of the backup.
    More info here, iPhone and iPod touch: Wrong passcode results in red disabled screen
    Not being able to fill in the passcode is not much different from forgetting it.
    If you cannot remember the passcode, you will need to restore your device using the computer with which you last synced it. This allows you to reset your passcode and resync the data from the device (or restore from a backup). If you restore on a different computer that was never synced with the device, you will be able to unlock the device for use and remove the passcode, but your data will not be present. Refer to Updating and restoring iPhone, iPad and iPod touch software.
    Also have a look at this one: iTunes: About iOS backups

  • How to Get the Unique Key results from OWB Tables after Profile

    Hi,
    We are using OWB 10gR2(Paris) Beta Version.
    In this version the new feature is introduced is Data Profiling.
    We are using this feature to analylize the data in terms of stanadards.
    We have done profiling for our tables and we are able to see the results for each table in OWB Profile Results Canvas. In this window one Unique Key tab is there to see the Unique results.
    Now my question is where these results will be stored in standard tables of OWB. I want to know those exact standard tables to extract thoes Unique results in to my reports.
    After profiling we are generating HTML-DB reports to view all these profile results. But we are not able to find the Uique Key tables where these results are stored.
    So pls can anybody provide help on this to get these tables...
    Thanks in advance...,
    Ramesh P.

    You can use DatabaseMetaData#getPrimaryKeys.

  • Displaying large result sets in Table View u0096 request for patterns

    When providing a table of results from a large data set from SAP, care needs to be taken in order to not tax the R/3 database or the R/3 and WAS application servers.  Additionally, in terms of performance, results need to be displayed quickly in order to provide sub-second response times to users.
    This post is my thoughts on how to do this based on my findings that the Table UI element cannot send an event to retrieve more data when paging down through data in the table (hopefully a future feature of the Table UI Element).
    Approach:
    For data retrieval, we need to have an RFC with search parameters that retrieves a maximum number of records (say 200) and a flag whether 200 results were returned. 
    In terms of display, we use a table UI Element, and bind the result set to the table.
    For sorting, when they sort by a column, if we have less than the maximum search results, we sort the result set we already have (no need to go to SAP), but otherwise the RFC also needs to have sort information as parameters so that sorting can take place during the database retrieval.  We sort it during the SQL select so that we stop as soon as we hit 200 records.
    For filtering, again, if less than 200 results, we just filter the results internally, otherwise, we need to go to SAP, and the RFC needs to have this parameterized also.
    If the requirement is that the user must look at more than 200 results, we need to have a button on the screen to fetch the next 200 results.  This implies that the RFC will also need to have a start point to return results from.  Similarly, a previous 200 results button would need to be enabled once they move beyond the initial result set.
    Limitations of this are:
    1.     We need to use custom RFC function as BAPI’s don’t generally provide this type of sorting and limiting of data.
    2.     Functions need to directly access tables in order to do sorting at the database level (to reduce memory consumption).
    3.     It’s not a great interface to add buttons to “Get next/previous set of 200”.
    4.     Obviously, based on where you are getting the data from, it may be better to load the data completely into an internal table in SAP, and do sorting and filtering on this, rather than use the database to do it.
    Does anyone have a proven pattern for doing this or any improvements to the above design?  I’m sure SAP-CRM must have to do this, or did they just go with a BSP view when searching for customers?
    Note – I noticed there is a pattern for search results in some documentation, but it does not exist in the sneak preview edition of developer studio.  Has anyone had in exposure to this?
    Update - I'm currently investigating whether we can create a new value node and use a supply function to fill the data.  It may be that when we bind this to the table UI element, that it will call this incrementally as it requires more data and hence could be a better solution.

    Hi Matt,
    i'm afraid, the supplyFunction will not help you to get out of this, because it's only called, if the node is invalid or gets invalidated again. The number of elements a node contains defines the number of elements the table uses for the determination of the overall number of table rows. Something quite similar to what you want does already exist in the WD runtime for internal usage. As you've surely noticed, only "visibleRowCount" elements are initially transferred to the client. If you scroll down one or multiple lines, the following rows are internally transferred on demand. But this doesn't help you really, since:
    1. You don't get this event at all and
    2. Even if you would get the event, since the number of node elements determines the table's overall rows number, the event would never request to load elements with an index greater than number of node elements - 1.
    You can mimic the desired behaviour by hiding the table footer and creating your own buttons for pagination and scrolling.
    Assume you have 10 displayed rows and 200 overall rows, What you need to be able to implement the desired behaviour is:
    1. A context attribute "maxNumberOfExpectedRows" type int, which you would set to 200.
    2. A context attribute "visibleRowCount" type int, which you would set to 10 and bind to table's visibleRowCount property.
    3. A context attribute "firstVisibleRow" type int, which you would set to 0 and bind to table's firstVisibleRow property.
    4. The actions PageUp, PageDown, RowUp, RowDown, FirstRow and LastRow, which are used for scrolling and the corresponding buttons.
    The action handlers do the following:
    PageUp: firstVisibleRow -= visibleRowCount (must be >=0 of course)
    PageDown: firstVisibleRow += visibleRowCount (first + visible must be < maxNumberOfExpectedRows)
    RowDown/Up: firstVisibleRow++/-- with the same restrictions as in page "mode"
    FirstRow/LastRow is easy, isn't it?
    Since you know, which sections of elements has already been "loaded" into the dataSource-node, you can fill the necessary sections on demand, when the corresponding action is triggered.
    For example, if you initially display elements 0..9 and goto last row, you load from maxNumberOfExpected (200) - visibleRows (10) entries, so you would request entries 190 to 199 from the backend.
    A drawback is, that the BAPIs/RFCs still have to be capable to process such "section selecting".
    Best regards,
    Stefan
    PS: And this is meant as a workaround and does not really replace your pattern request.

  • Cannot access columns in a result set using table alias in Oracle database

    I have a query which joins a few tables. There are a few columns in various tables with identical names. In the query, I have assigned table aliases for each table thinking it'll be the manner in which I access a specific column in a specific database table. However, when trying to retrieve the column, I'm getting an exception stating "Invalid column name". I had no problem doing so in my last project when I was coding against MySQL database so this is likely to be a driver implementation issue. My current workaround is to assign a column alias though I find this to be annoying and it does make the query very verbose.
    My question is whether this option is perhaps a configuration issue, a bug, or something that I'm missing. Also, I would like to know if anybody has an elegant workaround without accessing columns using their numeric index.
    I'm querying an Oracle 10i database in a managed environment (database connection is obtained from a Weblogic data source).
    Sample query:
    select
    a.address1,
    d.address1
    from
    account a
    inner join
    department d on a.department_id = d.department_id
    where
    a.account_id = 1000;
    When trying to access a ResultSet instance in the following manner, I will get an exception:
    rs.getString("d.address1");
    Retrieving "address1" will return the first column in the select clause.

    jonathan3 wrote:
    My question is whether this option is perhaps a configuration issue, a bug, or something that I'm missing. Since you already figured out that you can use an alias one can suppose that it is the last in that you are missing that you already have a solution.
    You can try extracting the meta data to see if it has a name without the alias. Probably not.
    Also, I would like to know if anybody has an elegant workaround without accessing columns using their numeric index.One can only suppose that you consider using names "elegant".

  • ABAP routine - looping a result set from table.

    I am trying to access a table and pass the resulting rows to an internal table.
    However, before passing, I need to do some data manipulation on one of the columns of the table and then pass it.
    If I didn't have to do this, I could have just said
    INTO CORRESPONDING FIELDS OF TABLE
    But since I have do data manipulation, I cannot do this. This is what I am doing now.
    SELECT * FROM /BI0/QEMPLOYEE WHERE JOB = '1234' AND DATETO = '99991231'.
    MOVE /BI0/QEMPLOYEE-EMPLOYEE TO INT_EMP-EMPN.
    MOVE /BI0/QEMPLOYEE-JOB TO STR1.
    STR2 = STR1 + 0(4)
    SEARCH STR2 FOR ' ' STARTING AT 1 ENDING AT 1.
    IF SY-SUBRC EQ 0.
    REPLACE ' ' WITH '0' INTO STR2.
    ENDIF.
    MOVE STR2 TO INT_EMP-FAC.
    But this will move only one row. How can I move all the rows? Is there a loop that I can use? I can see a loop for internal tables but I need to loop the result set and then send it. I posted this question twice but haven't gotten the right answer.
    Thanks.

    Hi,
    Are you trying to write the code in Update Routine or a Start Routine.?
    If you want to update all the records, you can use the start routine.
    So you need to use a loop for doing all the records.
    If you are using a Update routine then you dont have to use the loop.
    But here I recommend the Start Routine is the best choice.
    Here is a document which can be helpful for you:
    http://bluestonestep.com/component/option,com_docman/task,doc_download/gid,13/
    Happy Tony

  • Returning the Array of Result Set

    I am executing 3 SQL in a function in a Bean.I want this function to return all the 3 result set with a help of a singl return type.And extract the values of different result set in the JSP.How should i do this.CAn i make an Array of type ResultSet.
    Please guide me.

    The ideal solution is convert the resultset into a Collection object such as ArrayList and then transport it to the jsp layer. You cannot transport a resultset as it is associated with a connection object.
    BTW, as many of us have pointed out in this forum, care should be taken to release all the JDBC resources ASAP. Hence my take on tis will be to iterate through the resultset and take the data to a collection and close the resultset and associated resources.
    Cheers
    Sekar

  • Is it possible to copy the configuration of phone set to another MAC adress?

    Hi
    I have a  white coloured  9951 phone set with expansion module  And we have lots of button configurations on the device. But now we should change the  device because of the color. I mean we will use another 9951 device.
    Is there an easy way to  copy the configuration to this new mac adress phone set?

    Hi,
    It is possible using the Super Copy option. To copy an existing phone and copy the directory numbers, speed dials, busy lamp field/speed dials, and service URLs that are associated with the phone, locate the appropriate phone as described in "Finding a Phone" section, click the Super Copy button next to the phone that you want to copy, and continue with Step 5.
    http://www.cisco.com/c/en/us/td/docs/voice_ip_comm/cucm/admin/7_0_1/ccmcfg/701-cmcfg/b06phone.html#wp1407222
    https://supportforums.cisco.com/discussion/12072286/copy-versus-super-copy-whats-difference
      --- is the icon that you will see on the Device > Phone page.
    HTH
    Manish

  • In the url bar is it possible to autoselect the first search result by pressing enter?

    Whenever I use the url bar in firefox, often times the first entry in the bookmarks/history search is the one I want to use. What I want to do is just be able to type 'fb' for instance and just hit enter. It will then redirect me to facebook.com. What I have to do currently is type 'fb' (I have facebook bookmarked as fb) then hit the down arrow, then press enter. If I press enter without hitting the down arrow first, then it does google search for facebook, which is not what I intended. This is kind of cumbersome to me when 'fb' will always make the first entry be facebook due to how I have it bookmarked.

    Hi dr.admiral37,
    You could bookmark Facebook and add a Keyword (by editing the bookmark the keyword option will become available). You can then simply type the keyword (in this case fb) in your location bar, hit enter and you'll be redirected to the bookmarked site.
    Hope that helped.
    Regards,
    Ziggy

Maybe you are looking for