Looping through inbox items on timer event is really slow...?

Hi,
I have an issue with a email sync event that I am running.  Essentially, I am given a date (the received date of the last email synced) via another process and then need to return all the emails in the user's inbox the where receivedDate > this given
date.
I have a timer object than triggers my sync event every 15 mins.  I also have a button that allows the user to manually activate the sync - this basically changes the timer to 3 secs and so it fires the sync event.
If the sync event is fired manually as per above, it loops through everything quite quickly (~12,000 emails in 30 secs) and I can stored the sender/recipient and received time data I require from these in a list of objects, which I sync later on in a background
process.  During this loop the main UI freezes up, which is fine since I show a progress bar so the user knows how long they need to wait, and a large sync like this should only occur on their first sync theoretically.  If the first sync event is
fired without the manual input - so still called from the same timer event, but just on the normal 15 min event, not the shortened 3 sec one - then it runs differently.  The sync takes a lot lot longer, and the UI doesn't freeze up.
I presume this might be because it is fired slightly differently and does not hog up the main thread, but rather shares it with normal Outlook operations.  Maybe the operations are being run on a background thread and then keep having to jump into the
main thread to access the email items...?  Either way, I'm not quite sure how this is happening since the only difference is the user pressing a button that changes the timer.interval.  The code that is run is the same, and the button press doesn't
trigger the actual sync itself.
Is there a way I can force this first sync to always run solely in the main thread, it can freeze up Outlook and show the progress bar until it is done?  Ideally any subsequent syncs would then be run with no progress bar and no freezing up of the UI.
Many thanks,
Tom

Hello Tom,
> Maybe the operations are being run on a background thread and then keep having to jump into the main thread to access the email items...?
You shouldn't use another threads when dealing with the Outlook object model. Office applications use the single threaded apartment (STA) model and don't support multithreading. All calls made from another threads are marshalled by Outlook to the main
thread. However, you can use a low-level code (Extended MAPI) to access the data from secondary threads. For example, you can use Redemption which is based on Extended MAPI.
>  it loops through everything quite quickly (~12,000 emails in 30 secs)
Instead of looping over all items in the folder I'd recommend using the
Find/FindNext
or
Restrict methods of the Items class. You can read more about them in the following articles:
How To: Use Find and FindNext methods to retrieve Outlook mail items from a folder (C#, VB.NET)
How To: Use Restrict method to retrieve Outlook mail items from a folder
You can use the System.Windows.Forms.Timer class which uses the main thread for invoking the Tick event. The .NET
Framework Class Library provides three different timer classes: System.Windows.Forms.Timer, System.Timers.Timer, and System.Threading.Timer. Each of these classes has been designed and optimized for use in different situations. The Comparing
the Timer Classes in the .NET Framework Class Library article examines the three timer classes and helps you gain an understanding of how and when each class should be used.
Also you may find the
AdvancedSearch method of the Application class helpful. Pay special attention to the fact that the search is performed in another thread. You don’t need to run another thread manually since the
AdvancedSearch method runs it automatically in the background. See
Advanced search in Outlook programmatically: C#, VB.NET for more information.

Similar Messages

  • Loop through all items in all data blocks?

    Is there a way to loop through every item in every data block and set the property of a format mask?

    I do not know what error it is, only that an on-error trigger fires.
    I found out one thing I was definitely doing wrong, using nextblock, nextitem properties at the wrong level.
    DECLARE
         v_firstblock VARCHAR2(50);
         v_currentblock VARCHAR2(50);
         v_firstitem VARCHAR2(50);
         v_currentitem VARCHAR2(50);
         v_counter NUMBER :=0;
         v_counter2 NUMBER :=0;
    begin
       v_firstblock := get_form_property(:System.Current_Form,first_block);
       v_currentblock:= get_block_property(v_firstblock,nextblock);
       MESSAGE(v_firstblock||v_currentblock);
         LOOP
              v_counter := v_counter +1;
              IF (v_counter >10) THEN
                   exit;
              END IF;
              IF (v_currentblock = v_firstblock) THEN
                             exit;
           ELSE
                   v_firstitem :=  get_block_property(v_firstblock,first_item);
                        IF (lower(GET_ITEM_PROPERTY(v_firstitem,format_mask))=lower('mm-dd-yyyy')) THEN
                                       SET_ITEM_PROPERTY(v_firstitem,format_mask,'DD-MON-YYYY');
                        END IF;
                   v_currentitem :=  get_block_property(v_firstblock,first_item);
                   v_currentblock:= get_block_property(v_currentblock,nextblock);
                   GO_BLOCK(v_currentblock);
                        LOOP
                             v_counter2 := v_counter2 +1;
                             IF (v_counter2>15) THEN
                                  exit;
                             END IF;
                             v_currentitem:= get_item_property(v_currentitem,nextitem);
                             MESSAGE(v_counter||v_firstblock||v_currentblock||v_firstitem||v_currentitem||v_counter2);
                             IF (v_currentitem <> v_firstitem) THEN
                                  IF (lower(GET_ITEM_PROPERTY(v_currentitem,format_mask))=lower('mm-dd-yyyy')) THEN
                                       SET_ITEM_PROPERTY(v_currentitem,format_mask,'DD-MON-YYYY');
                                  END IF;
                             ELSE
                                  exit;
                             END IF;
                        END LOOP;
               END IF;
      END LOOP;
         end;Here is updated new code. I am currently trying to debug it, it has crashed my form on the server when tied to a button press.
    EDIT: So far I have found that it infinitely loops through the first 3 items and a null item in the first block. Still looking into why...
    EDIT: Some code changes to temporarily stop infinite loop and make v_currentblock actually change. Still loops through same 3 items in the first data block even though v_currentblock changes.
    Edited by: 878576 on Oct 21, 2011 12:46 PM

  • Help looping through page items

    Hello,
    I'm new to InDesign scripting and I need a way to programmatically loop through the items on a page of a document and get all of the text frame IDs (Using javascript). Once I find a match of the text frame I am looking for, I will need to update its contents. Is there an easy way to do this?
    Thanks in advance!
    - Lloyd

    Hey!
    var myTextFrames = app.activeDocument.textFrames;
    var myTextFramesNo = myTextFrames.length;
    Now myTextFramesNo holds number of text frames in document and myTextFrames holds text frame objects. Now you can run through text frames and set contents for each of them like this:
    myTextFrames[0].contents = "My Frame Contents";
    That's for start
    tomaxxi
    http://indisnip.wordpress.com/

  • Does anyone know a way to programatically loop through the items in the document library

    A lot of the funcations like deleteSymbol and updateSymbol depend on which items are "selected" in the library panel.
    Is there a way to programatically access these selections?
    or
    Loop through the library?
    or
    Set selections?

    Yup, I've asked for an API to access the selection in those panels for years, to no avail.
    Note that you can loop through layers, frames and pages, but you can't tell what the user has selected in the actual panel UI.  Also, you can't find out which symbols are currently used in the document.  Nor can you programmatically insert a rich symbol into the document and have it maintain its "richness".

  • Looping through XML Items

    Hi,
    I am selecting data from tables in forms of xml like below
    xml_data VARCHAR2(32000) :=
    SELECT XMLELEMENT("form",
    xmlagg(xmlelement("item",
    XMLFOREST(form_seq_no "form_seq_no",
    patientid "patientid",
    facilityid "facilityid"
    from (SELECT
    e.form_seq_no,
    e.patientid,
    e.facilityid
    FROM hosp e
    I am using a cursor like below to get the data
    OPEN l_rc FOR xml_data;
    LOOP
    if l_rc%notfound then
    EXIT ;
    end if;
    FETCH l_rc
    INTO l_xml;
    update hosp set transmit_date = sysdate;
    end loop;
    CLOSE l_rc;
    The above query returns all items in the table....I am trying to limit the number of records returned based on limit I pass...If the user enters 2, only two items from the node has to be returned. I am not having a clue on how to do this. It would be great if any one can help me...

    Thank you both for the replies. I am able to get the data based on the limit I pass...I have another question.
    Once the xml doc result is returned or once the select operation is performed and cursor data is fetched into a xmltype variable, I am updating a table's data with the current date...But I have to update the table based on the form_seq_no in the result xml doc...If the result set has three records, then it would have three different form_seq_no. Right now I am doing like below
    SELECT XMLELEMENT("form",
    xmlagg(xmlelement("item",
    XMLFOREST(form_seq_no "form_seq_no",
    patientid AS "patientid",
    facilityid AS "facilityid" ))))
    INTO l_xml
    from (SELECT
    e.form_seq_no,
    e.patientid,
    e.facilityid
    FROM hosp e
    ORDER BY e.form_seq_no
    WHERE ROWNUM < p_num_of_rows;
    I am using a cursor like below to get the data
    OPEN l_rc FOR xml_data;
    LOOP
    if l_rc%notfound then
    EXIT ;
    end if;
    FETCH l_rc
    INTO l_xml;
    This is the update I am doing, based on the result set I pasted below....But I get an error that extractValue can return only one child...I am at loss to know how to loop through the result set and perform the update...
    update hosp set transmit_date = sysdate where form_seq_no = extractValues(l_xml, 'form/item/form_seq_no);
    end loop;
    CLOSE l_rc;
    If I give rownum <3 , I get 3 rows, the result set might look like as follows:
    <form>
    <item>
    <form_seq_no>1</form_inst_seq_no>
    <patientid>21</patientid>
    <facilityid>23</facilityid>
    </item>
    <item>
    <form_seq_no>2</form_inst_seq_no>
    <patientid>212</patientid>
    <facilityid>233</facilityid>
    </item>
    <item>
    <form_seq_no>3</form_inst_seq_no>
    <patientid>213</patientid>
    <facilityid>234</facilityid>
    </item>
    I am new to this xml and xml manipulation in oracle...What are the concepts I would have to know in order to achieve my task above? And Right now I have this book called "Oracle Database 11g The Complete Reference" by Kevin Loney, but I neither find any elaborate explanations nor examples. What other books would anyone suggest to learn more on oracle and pl/sql.
    Thanks a lot in advance.

  • Time Machine going REALLY slow!

    I got my first apple product 3 years ago, and over the years have gotten more attached and I have kept up to date with everything. I decided I needed to backup my new 17" MacBook Pro (sucessing my old White MacBook). So I brought a 1TB Time Capsule, to use for my wireless network AND to backup. So, 4 days ago I set it up and began the Time Machine process before setting up my wireless network. I have 93.54 GB worth of data on my computer, I was up to 64.98 GB a few hours ago, when my MacBook decided to freeze. I was hoping that it would resume the backup when I restarted. But, no hope. I also noticed that my Time Capsule was an amber-orange color and was blinking. I went into Time Machine, it said it was not set up. I did everything. Anyway, I solved that. Now to the problem 3 hours ago I started (again) the backup process. And it is going REALLY slow, its 4.07 GB out of 93.54 GB. Is there any possible way to speed the backup up? thanks!

    Are you using 802.11n or 802.11g connection?
    If 802.11n, are you using 5GHz ONLY frequences, or are you using the 2.4GHz frequences? 5GHz will give you much (MUCH) faster transfer speeds.
    Time Capsule -> Wireless -> Radio Mode -> 802.11n only (5GHz)
    Is your Time Capsule -> Wireless -> Wireless Options -> Multicast Rate -> 24Mbps
    and Transmit Power 100%
    But as has been suggested, connect via Ethernet using Gigabit capable cables and you should be able to your initial backup much faster.
    Also NOTE: If your initial backup was interrupted such that the Time Machine Sparse Bundle needed to be repaired, a lot of initial time when you restarted your backup could have been spend while fsck was being run against the volume.

  • Question on how to loop through a variable amount of objects

    I have a csv file which I am parsing with powershell and it works perfectly. I would like to speed it up. Currently, I call a line that is customized for each groups list of subnets.
    I have about 30 groups.
    Some groups have one subnet, some have 5 subnets.
    I want to set up some sort of loop to parse everything while executing a single Import-CSV. Currently I call Import-CSV once per group. It takes me about 2-4 minutes to parse the entire file depending on the speed of the machine.
    The csv file has about 30,000 rows. I am not concerned about running out of resources. This is as much a learning challenge as a desire to make better powershell scripts.
    Below is a portion of the one liner that would parse the entire csv file looking only for those items that match, and writing them out to that groups specific csv file.
    Example #1
    Import-Csv $HostList |  Where-Object {$_."IP Address" -Match "^192.1.*" -or $_."IP Address" -Match "^192.2.*" -or $_."IP Address" `-Match "^192.3.*"  .....}| do more stuff...
    Example #2
    Import-Csv $HostList |  Where-Object {$_."IP Address" -Match "^192.7.*" ....}| do more stuff...
    The example above is just a snippet from code that works perfectly.
    The problem I am asking for help with is, when I loop through the items I am matching against (subnets), if one group has 3 items to match against, another has 1, another has 7, how do I set up such a loop?
    Am I using some sort of 'while'  $_."IP Address" or...?
    Do I create a big 30,000 array (Does PS even use arrays?)
    I would love to know what this type of looping is called, and what I can read with examples on how to understand approaching this challenge..
    Thank you for any help.
    -= Bruce D. Meyer

    The reason for the parsing (I thought I explained it, must have been too vague) is I have about 30 agencies in a csv file.
    Each agency can be determined by their subnet(s) and domain(s)
    I need to put all lines in the csv relating to each agency in their own separate csv file to distribute to them so I am not sharing agency 'A' info with the other 29 agencies.
    I get the regex comment. Thank you. For some reason I am rather hesitant to use PCRE under windows. I'll see how it works.
    Your comment on "Reloading a large file repeatedly takes more time", is the exact reason why I asked the question. I want to get away from that.
    I appreciate your quick reply, I think your example will work nicely. 
    -= Bruce

  • Loop though all item in folder and outside folder using foreach.

    i have library having files inside folders some files outside folders,
    currently i am looping through library as below
     foreach (SPListItem items in listItems)
    //My Code
    but this not looping through items in  folders ,Any pointer how to modify above code to make it loop through all items inside outside folders in Documentlibrary.

    Hey,
    You can set a recursive scope for CAML query and displays all files contained within a specified document library. Have below code and some links for your reference.
    using (SPSite siteCollection = new SPSite(SPContext.Current.Web.Url))
        using (SPWeb web = siteCollection.OpenWeb())
            SPList objList = web.Lists["LibraryName"];
            SPQuery oQuery = new SPQuery();
            StringBuilder queryText = new StringBuilder();
            queryText.Append("<OrderBy><FieldRef Name='ID' /></OrderBy>");
            oQuery.Query = queryText.ToString();
            oQuery.ViewAttributes = "Scope=\"Recursive\"";
            SPListItemCollection collListItemsAvailable = objList.GetItems(oQuery);
            foreach (SPListItem oListItemAvailable in collListItemsAvailable)
                //Do something here
    CAML query that includes folders in result set
    Working with SPQuery
    Thanks.

  • Populate Local XML File, and Loop through it

    I created a local property of type XML.   I want to populate this variable with the results of a SQL query, and store it in local memory.  Then later, I will loop through this file and perform actions.   Basically I am going to have to loop through this resultset many times, and if I can store it in memory, I won't have to re-qurey the DB>
    #1 Is this possible? 
    Right now, I use a repeater on the SQL, and assign the rowset/rowset/row to the local XML Variable.(Assign XML). SHould I use Assign XML, or APpend XML for the Link Type
    THen later I am trying a repeater to loop through the flle, and I have no idea where to point the xpath expression to.
    Thanks for the help in advance,
    JEff

    From what I understand you are trying to do - Rather than repeating on the SQL query you can link the "Result" of the SQL Query action to the local property (type xml) [and yes you just say Assign XML instead of Append or anything else].
    What this would do is assign the local variable the results of the SQL Query in an xMII XML format and then you can further work on this XML.
    But rather than using the local variable you can repeat on the SQL Query Action (the way you are doing currently) and manipulate what ever you want to. There is no question of requerying the DB as ur DB would be queried only one time (the SQL Query Action Block will ensure this) and then the repeater would be repeating only on the resulset rendered by the SQL Query action.
    Did this make it clearer or have I not understood your  problem?

  • Loop through nested elements and insert via PL/SQL

    INSERT INTO Orders(id, OrderXML) VALUES
    (S_Orders.Nextval,
    '<?xml version="1.0" encoding="utf-8" ?>
    <Order xmlns="urn:foo" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:foo foo-1.xsd">
    <OrderRef>BBB</OrderRef>
    <OrderDate>2005-03-29</OrderDate>
    <CustomerID>1051</CustomerID>
    <Items>
    <Item>
    <ProductID>7</ProductID>
    <Price>45.6</Price>
    <Quantity>2</Quantity>
    </Item>
    <Item>
    <ProductID>19</ProductID>
    <Price>73.5</Price>
    <Quantity>10</Quantity>
    </Item>
    </Items>
    </Order>'
    I some questions regarding index search of nested elements like,Items in the above example.
    I would like to know how I can LOOP through the Items like 1..2 LOOP
    and insert those elements(item) into one table. Order information should go in to another table.
    Can this be done with xpath and PL/SQL.
    Regards
    Ulf

    Hi Marco!
    Here's some more information:
    CREATE TABLE ITEM (ProductID NUMBER,
    Price NUMBER(8,2)
    Quantity 10 NUMBER);
    CREATE TABLE ORDER (OrderRef VARCHAR2(10),
    ORDER_DATE VARCHAR2(10),
    CUSTOMERID NUMBER);
    The main problem that I have is to create an solution that can be dynamic so that I can have for instance one order and four items in one XML.
    The second XML can have one order and 10 items.
    First I want to insert the order elements in the order table and then the items records in the item table.
    To complicate things futher my real XML have namespaces in the XML, but this I think I can handle.
    Summary: So for each order row(element) I want to traverse the Item elements and insert them to the Item table.
    Regards
    /Ulf

  • Looping through XML tree

    Hi All,
    I need help in retrieving the values of nodes in a XML tree
    If I have a xml document like
    <form>
    <item>
    <form_seq_no>1</form_inst_seq_no>
    <patientid>21</patientid>
    <facilityid>23</facilityid>
    </item>
    <item>
    <form_seq_no>2</form_inst_seq_no>
    <patientid>212</patientid>
    <facilityid>233</facilityid>
    </item>
    <item>
    <form_seq_no>3</form_inst_seq_no>
    <patientid>213</patientid>
    <facilityid>234</facilityid>
    </item>
    How can I get the values of form_Seq_no node?
    I want to loop for all the nodes so that I can update a table for every form_seq_no....
    Thanks....

    Why did you open a new thread where the problem seems to be exactly the same as the one from your Re: Looping through XML Items?
    In particular what is wrong with the solution given Re: Looping through XML Items?

  • LIssue with time events upload through RPTEUP10

    Dear experts,
    I am using the standard report RPTEUP10 for uploading time events in IT 2011. It works fine but in the log, it just indicates the number of records read, posted, placed in the error pool ...
    Can we by any chance know the PERNRs for which the upload failed? The FM HR_CC1_TIMEEVENT_INSERT directly takes table of time events as parameter.
    Will I have to put this FM inside a loop and pass a each entry for each PERNR separately, so that I could catch the failed PERNRs? or is there any standard solution to this?
    Please advice.
    Regards,
    Sumit Nene

    Hi,
    Actually we tried to upload the data manually through RPTEUP10 using txt file and also our client also want this for few locations.
    But we are unable to sort it out.
    I have gone through your document  and we adopted for automatic recording process as  my colleague confirmed it works excellent.
    But the problem is with manual uploading, the same is not showing in it 2011.
    any changes required in 2011 or 0050 before recording.
    it 0007, 1-1 is selected.
    please suggest some measure to achieve this.
    Regards,
    Sumana

  • Loop through to find the item if its true or untrue

    Hi Gurus!
    I have  alogic which checks if a particular document condition item is active and then selects all and checks if the document is list or off-list. I want the logic to loop through the same logic for all conditions for the same item to determine if the item is list or off-list setting. At the end of loop it will show if it is list -1 or off list 2 or not applicable -0 and then continue with the loop. I have prepared the l;ogic but not getting through the loop logic.
    data:  lv_kotabnr type c length 15,
             it_konv type  konv,
             lv_kozgf type T685-kozgf,
             it_t685 type standard table of t685.
      select * from konv
        into it_konv where
              kinak = ' ' and
              knumv eq iv_knumv and
              kposn eq iv_kposn .
          select single kozgf into lv_kozgf
              from T685 where
                  kappl = 'V' and
                  kschl = it_konv-kschl.
                 if sy-subrc eq 0.
            select single kotabnr into lv_kotabnr
                                  from T682I
                                 where kappl = 'V'  and
                                       kolnr eq it_konv-kolnr and
                                       kozgf eq ( select kozgf
                                                              from T685
                                                              where kappl = 'V' and
                                                                    kschl = it_konv-kschl ).
            if sy-subrc eq 0.
              select single ZPRICE_TYPE into RV_IS_LIST from zsd_price_type where kotabnr  = lv_kotabnr .
            endif.
          endif.
    endif.
      endselect.
    If someone can help on this would be very kind.
    Thanks

    I am using this in my method . Can someone plz help me out please.
    Thanks.
    I will be using this methiod in one of my querry to generate a list of pricing and will use this in one of my fields to show if its list or off list. With the code that I ahve written it will give a performance issue as its selecting one by one . SO ids there  a way to have the speed of the processing increased and so that at a time itslef it selects all the items of the condition in loop and throwas out teh result.
    Thanks

  • Nested Loops...looping through one month of data at a time year by year

    Hi all,
    I'm trying to create an insert statement that loops through a table that has 10 years of data (2001 to 2010) month by month to minimize impact on server and commits more frequently to avoid filling up the redo logs and rollback tablespaces. The table is large, has about 40 millions records per year. Lets say the structure of the table is the following:
    Customer_ID number(9),
    Order_Item_1 number(6),
    Order_Item_2 number(6),
    Order_Item_3 number(6),
    Order_date date
    The table is in flat format but I want to normalize it so that it looks like the following:
    Customer_ID Order_Seq Order_Item Order_date
    999999999 1 555555 01-jan-2001
    999999999 2 666666 01-jan-2001
    999999999 3 444444 01-jan-2001
    888888888 1 555555 03-jan-2001
    888888888 2 666666 03-jan-2001
    But because I want to loop through month by month....I need to set it up so that it loops through month by month, year by year (Using the Order Date Field) and Order_item by Order_item. Something like:
    so my insert statements would be something like if I hardcoded instead of put the insert statement into a loop:
    insert into orders_normalized
    (Customer_id,Order_seq,Order_item,Order_date) select customer_id,1,Order_item,Order_date where Order_item_1 is not null and to_char(order_date,'yyyy') = '2001' and to_char(order_date,'mm')='01';
    insert into orders_normalized
    (Customer_id,Order_seq,Order_item,Order_date) select customer_id,2,Order_item,Order_date where Order_item_2 is not null and to_char(order_date,'yyyy') = '2001' and to_char(order_date,'mm')='01';
    insert into orders_normalized
    (Customer_id,Order_seq,Order_item,Order_date) select customer_id,3,Order_item,Order_date where Order_item_3 is not null and to_char(order_date,'yyyy') = '2001' and to_char(order_date,'mm')='01';
    insert into orders_normalized
    (Customer_id,Order_seq,Order_item,Order_date) select customer_id,1,Order_item,Order_date where Order_item_1 is not null and to_char(order_date,'yyyy') = '2001' and to_char(order_date,'mm')='02';
    insert into orders_normalized
    (Customer_id,Order_seq,Order_item,Order_date) select customer_id,2,Order_item,Order_date where Order_item_2 is not null and to_char(order_date,'yyyy') = '2001' and to_char(order_date,'mm')='02';
    insert into orders_normalized
    (Customer_id,Order_seq,Order_item,Order_date) select customer_id,3,Order_item,Order_date where Order_item_3 is not null and to_char(order_date,'yyyy') = '2001' and to_char(order_date,'mm')='03';
    Hope this makes sense.
    Thanks

    Does the sequence of items in an order really matter? In other words, do we really need to preserve that an item was in position 2 versus position 1? I bet that the sequence or position of each item in an order is not meaningful. They were probably numbered 1, 2, and 3 just to make them uniquely named columns so there would be three slots to hold up to 3 items in the denormalized table.
    You only have about 400 million rows to insert, so it could feasibly be done in a single transaction (depending on your database environment).
    You can always do a create table as select (CTAS) to help with undo / redo issues and get better performance. You could run it in parallel, and spit it out to a new table partitioned by month. Single DDL statement running in parallel making your new table--sounds good to me.
    How about something like this:
    CREATE TABLE ORDERS_NORMALIZED
    (CUSTOMER_ID, ORDER_ITEM, ORDER_DATE)
    PARTITION BY RANGE(ORDER_DATE)
    PARTITION p200901 VALUES LESS THAN (TO_DATE('200902','YYYYMM')),
    PARTITION p200902 VALUES LESS THAN (TO_DATE('200903','YYYYMM')),
    PARTITION p201012 VALUES LESS THAN (TO_DATE('201101','YYYYMM'))
    as SELECT CUSTOMER_ID, ORDER_ITEM_1, ORDER_DATE
       FROM OTHER_TABLE
       WHERE ORDER_ITEM_1 IS NOT NULL
       UNION ALL
       SELECT CUSTOMER_ID, ORDER_ITEM_2, ORDER_DATE
       FROM OTHER_TABLE
       WHERE ORDER_ITEM_2 IS NOT NULL
       UNION ALL
       SELECT CUSTOMER_ID, ORDER_ITEM_3, ORDER_DATE
       FROM OTHER_TABLE
       WHERE ORDER_ITEM_3 IS NOT NULL.....................
    Out of curiosity, why not normalize it further? You could have used two tables instead of one.
    One (ORDER) with:
    ORDER_ID
    CUSTOMER_ID
    DATE
    Order_id would be a new surrogate key / primary key.
    Another table (ORDER_ITEM) with:
    ORDER_ID
    ORDER_ITEM
    It would be a table that links ORDERS to ITEMS. You get the idea.

  • Looping through items in a web app

    Hi there,
    On this site - http://www.dandmrural.com.au/
    Where it reads Latest news, I have each news piece setup as a content holder with a piece of javascript looping through them.
    I want to modify this to use Web apps so the client can add and remove items themselves and have them looping through as they do now.
    Using a Webapp I have access to {module_webapps,20117,a} which lists out all the items and {module_webappscount,20117} which gives me a count of the number of items.
    Can someone please give me some pointers on how to go about migrating from a content holder setup to using webapps.
    Thanks, Ben

    Your first step should be to customize the web app item list layout to match how each item is rendered in the shared content holder. From there, you should recreate each news item as an individual web app items. Finally, replace the content holder with the web app item list module ( {module_webapps,20117,a} ). It appears that the script that is responsible for handling the looping can be found here and is not relying on any sort of fixed number to control the transitions. Instead, it simply is looking for any divs which have an id that begin with "content-" and fades them in & out in whatever order it finds them until it reaches the final item and then starts over.
    Additionally, I would recommend adding some sort of incremental counter to your div id within your list template. Currently, the divs which contain each of the three news items share the same id attribute of "content-" which is not something you want.
    Something like this in your list layout should do the trick:
    <div id="content-{tag_counter}">

Maybe you are looking for

  • Dual monitor setup on imac G5 only works in mirror mode

    Hi, I have an iMac G5, 2Ghz. I have added a second monitor but when I go to Displays, I don't get an option to setup the monitors like I do on my Intel iMac. The G5 goes into mirror mode and displays the same image on both monitors. I would like to s

  • All flash components work when published except one....

    I have a website built in Dreamweaver CS4 that uses a flash header, photo gallery and video. Everything works great except for the video on the home page. From what I can tell it works fine in Firefex but not IE8 or IE8 in compatability mode. IE keep

  • PSE8 & Dual Monitor Question

    I just connected an external display to my MacBook Pro & have a couple of very remedial questions. I have the displays set up in the "extended desktop" mode. But when I open an image in ACR, I cannot drag the ACR window to my external display. Can yo

  • Error when trying to run the Inventory Turnover query

    When I try to run the Inventory Turnover query I get the following error message (I can run other queries that I checked): <internal error> Receiving from the BW server failed BW server raised exception: SYSTEM_FAILURE Do you want to see more informa

  • Dont want Transform matrix, when file save as SVG

    Hi All, I am using AI and saving the file as SVG. When I look the saved SVG file. it looks some what like... <rect x="107" y="104" fill="none" width="159" height="26"/> <text transform="matrix(1 0 0 1 107 112.52)"font-family="'MyriadPro-Regular'" fon