Need Help with creating Line Graph Chart

I have the following XML Data
<DATA>
<PERCENT_ROW>
<YEAR>2007</YEAR>
<PERIOD>3</PERIOD>
<MATERIAL_TYPE>C</MATERIAL_TYPE>
<BRANCHDESC>Longview</BRANCHDESC>
<LOCATION>30</LOCATION>
<QUARTERDESC>Quarter 1</QUARTERDESC>
<CURRPERIOD>Mar 2007</CURRPERIOD>
<VALUECURRENTPERIOD>99.9</VALUECURRENTPERIOD>
<QUARTERVALUE>100</QUARTERVALUE>
<YTDVALUE>100</YTDVALUE>
<STDCURRENTPERIOD>99.2</STDCURRENTPERIOD>
<VARIANCE_STD>-.7</VARIANCE_STD>
<VARIANCE_STD_PERCENT>-.7</VARIANCE_STD_PERCENT>
<CURRENT_12MMA>99.97</CURRENT_12MMA>
<PRIOR_12MMA>0</PRIOR_12MMA>
<CURRPERSUB1>Feb 2007</CURRPERSUB1>
<VALUECURRENTPERIODSUB1>100</VALUECURRENTPERIODSUB1>
<CURRPERSUB2>Jan 2007</CURRPERSUB2>
<VALUECURRENTPERIODSUB2>100</VALUECURRENTPERIODSUB2>
<CURRPERSUB3>Dec 2006</CURRPERSUB3>
<VALUECURRENTPERIODSUB3>0</VALUECURRENTPERIODSUB3>
<CURRPERSUB4>Nov 2006</CURRPERSUB4>
<VALUECURRENTPERIODSUB4>0</VALUECURRENTPERIODSUB4>
<CURRPERSUB5>Oct 2006</CURRPERSUB5>
<VALUECURRENTPERIODSUB5>0</VALUECURRENTPERIODSUB5>
<CURRPERSUB6>Sep 2006</CURRPERSUB6>
<VALUECURRENTPERIODSUB6>0</VALUECURRENTPERIODSUB6>
<CURRPERSUB7>Aug 2006</CURRPERSUB7>
<VALUECURRENTPERIODSUB7>0</VALUECURRENTPERIODSUB7>
<CURRPERSUB8>Jul 2006</CURRPERSUB8>
<VALUECURRENTPERIODSUB8>0</VALUECURRENTPERIODSUB8>
<CURRPERSUB9>Jun 2006</CURRPERSUB9>
<VALUECURRENTPERIODSUB9>0</VALUECURRENTPERIODSUB9>
<CURRPERSUB10>May 2006</CURRPERSUB10>
<VALUECURRENTPERIODSUB10>0</VALUECURRENTPERIODSUB10>
<CURRPERSUB11>Apr 2006</CURRPERSUB11>
<VALUECURRENTPERIODSUB11>0</VALUECURRENTPERIODSUB11>
</PERCENT_ROW>
<PERCENT_ROW>
<YEAR>2007</YEAR>
<PERIOD>3</PERIOD>
<MATERIAL_TYPE>C</MATERIAL_TYPE>
<BRANCHDESC>Oakland</BRANCHDESC>
<LOCATION>31</LOCATION>
<QUARTERDESC>Quarter 1</QUARTERDESC>
<CURRPERIOD>Mar 2007</CURRPERIOD>
<VALUECURRENTPERIOD>100</VALUECURRENTPERIOD>
<QUARTERVALUE>100</QUARTERVALUE>
<YTDVALUE>100</YTDVALUE>
<STDCURRENTPERIOD>100</STDCURRENTPERIOD>
<VARIANCE_STD>0</VARIANCE_STD>
<VARIANCE_STD_PERCENT>0</VARIANCE_STD_PERCENT>
<CURRENT_12MMA>100</CURRENT_12MMA>
<PRIOR_12MMA>0</PRIOR_12MMA>
<CURRPERSUB1>Feb 2007</CURRPERSUB1>
<VALUECURRENTPERIODSUB1>100</VALUECURRENTPERIODSUB1>
<CURRPERSUB2>Jan 2007</CURRPERSUB2>
<VALUECURRENTPERIODSUB2>100</VALUECURRENTPERIODSUB2>
<CURRPERSUB3>Dec 2006</CURRPERSUB3>
<VALUECURRENTPERIODSUB3>0</VALUECURRENTPERIODSUB3>
<CURRPERSUB4>Nov 2006</CURRPERSUB4>
<VALUECURRENTPERIODSUB4>0</VALUECURRENTPERIODSUB4>
<CURRPERSUB5>Oct 2006</CURRPERSUB5>
<VALUECURRENTPERIODSUB5>0</VALUECURRENTPERIODSUB5>
<CURRPERSUB6>Sep 2006</CURRPERSUB6>
<VALUECURRENTPERIODSUB6>0</VALUECURRENTPERIODSUB6>
<CURRPERSUB7>Aug 2006</CURRPERSUB7>
<VALUECURRENTPERIODSUB7>0</VALUECURRENTPERIODSUB7>
<CURRPERSUB8>Jul 2006</CURRPERSUB8>
<VALUECURRENTPERIODSUB8>0</VALUECURRENTPERIODSUB8>
<CURRPERSUB9>Jun 2006</CURRPERSUB9>
<VALUECURRENTPERIODSUB9>0</VALUECURRENTPERIODSUB9>
<CURRPERSUB10>May 2006</CURRPERSUB10>
<VALUECURRENTPERIODSUB10>0</VALUECURRENTPERIODSUB10>
<CURRPERSUB11>Apr 2006</CURRPERSUB11>
<VALUECURRENTPERIODSUB11>0</VALUECURRENTPERIODSUB11>
</PERCENT_ROW>
<PERCENT_ROW>
<YEAR>2007</YEAR>
<PERIOD>3</PERIOD>
<MATERIAL_TYPE>C</MATERIAL_TYPE>
<BRANCHDESC>Seattle</BRANCHDESC>
<LOCATION>32</LOCATION>
<QUARTERDESC>Quarter 1</QUARTERDESC>
<CURRPERIOD>Mar 2007</CURRPERIOD>
<VALUECURRENTPERIOD>12.4</VALUECURRENTPERIOD>
<QUARTERVALUE>18.7</QUARTERVALUE>
<YTDVALUE>18.7</YTDVALUE>
<STDCURRENTPERIOD>-2527.7</STDCURRENTPERIOD>
<VARIANCE_STD>-2540.1</VARIANCE_STD>
<VARIANCE_STD_PERCENT>100.5</VARIANCE_STD_PERCENT>
<CURRENT_12MMA>18.7</CURRENT_12MMA>
<PRIOR_12MMA>0</PRIOR_12MMA>
<CURRPERSUB1>Feb 2007</CURRPERSUB1>
<VALUECURRENTPERIODSUB1>37.2</VALUECURRENTPERIODSUB1>
<CURRPERSUB2>Jan 2007</CURRPERSUB2>
<VALUECURRENTPERIODSUB2>6.5</VALUECURRENTPERIODSUB2>
<CURRPERSUB3>Dec 2006</CURRPERSUB3>
<VALUECURRENTPERIODSUB3>0</VALUECURRENTPERIODSUB3>
<CURRPERSUB4>Nov 2006</CURRPERSUB4>
<VALUECURRENTPERIODSUB4>0</VALUECURRENTPERIODSUB4>
<CURRPERSUB5>Oct 2006</CURRPERSUB5>
<VALUECURRENTPERIODSUB5>0</VALUECURRENTPERIODSUB5>
<CURRPERSUB6>Sep 2006</CURRPERSUB6>
<VALUECURRENTPERIODSUB6>0</VALUECURRENTPERIODSUB6>
<CURRPERSUB7>Aug 2006</CURRPERSUB7>
<VALUECURRENTPERIODSUB7>0</VALUECURRENTPERIODSUB7>
<CURRPERSUB8>Jul 2006</CURRPERSUB8>
<VALUECURRENTPERIODSUB8>0</VALUECURRENTPERIODSUB8>
<CURRPERSUB9>Jun 2006</CURRPERSUB9>
<VALUECURRENTPERIODSUB9>0</VALUECURRENTPERIODSUB9>
<CURRPERSUB10>May 2006</CURRPERSUB10>
<VALUECURRENTPERIODSUB10>0</VALUECURRENTPERIODSUB10>
<CURRPERSUB11>Apr 2006</CURRPERSUB11>
<VALUECURRENTPERIODSUB11>0</VALUECURRENTPERIODSUB11>
</PERCENT_ROW>
<PERCENT_ROW>
<YEAR>2007</YEAR>
<PERIOD>3</PERIOD>
<MATERIAL_TYPE>C</MATERIAL_TYPE>
<BRANCHDESC>Yakima</BRANCHDESC>
<LOCATION>33</LOCATION>
<QUARTERDESC>Quarter 1</QUARTERDESC>
<CURRPERIOD>Mar 2007</CURRPERIOD>
<VALUECURRENTPERIOD>36.4</VALUECURRENTPERIOD>
<QUARTERVALUE>68.2</QUARTERVALUE>
<YTDVALUE>68.2</YTDVALUE>
<STDCURRENTPERIOD>-5517.2</STDCURRENTPERIOD>
<VARIANCE_STD>-5553.6</VARIANCE_STD>
<VARIANCE_STD_PERCENT>100.7</VARIANCE_STD_PERCENT>
<CURRENT_12MMA>68.17</CURRENT_12MMA>
<PRIOR_12MMA>0</PRIOR_12MMA>
<CURRPERSUB1>Feb 2007</CURRPERSUB1>
<VALUECURRENTPERIODSUB1>68.6</VALUECURRENTPERIODSUB1>
<CURRPERSUB2>Jan 2007</CURRPERSUB2>
<VALUECURRENTPERIODSUB2>99.5</VALUECURRENTPERIODSUB2>
<CURRPERSUB3>Dec 2006</CURRPERSUB3>
<VALUECURRENTPERIODSUB3>0</VALUECURRENTPERIODSUB3>
<CURRPERSUB4>Nov 2006</CURRPERSUB4>
<VALUECURRENTPERIODSUB4>0</VALUECURRENTPERIODSUB4>
<CURRPERSUB5>Oct 2006</CURRPERSUB5>
<VALUECURRENTPERIODSUB5>0</VALUECURRENTPERIODSUB5>
<CURRPERSUB6>Sep 2006</CURRPERSUB6>
<VALUECURRENTPERIODSUB6>0</VALUECURRENTPERIODSUB6>
<CURRPERSUB7>Aug 2006</CURRPERSUB7>
<VALUECURRENTPERIODSUB7>0</VALUECURRENTPERIODSUB7>
<CURRPERSUB8>Jul 2006</CURRPERSUB8>
<VALUECURRENTPERIODSUB8>0</VALUECURRENTPERIODSUB8>
<CURRPERSUB9>Jun 2006</CURRPERSUB9>
<VALUECURRENTPERIODSUB9>0</VALUECURRENTPERIODSUB9>
<CURRPERSUB10>May 2006</CURRPERSUB10>
<VALUECURRENTPERIODSUB10>0</VALUECURRENTPERIODSUB10>
<CURRPERSUB11>Apr 2006</CURRPERSUB11>
<VALUECURRENTPERIODSUB11>0</VALUECURRENTPERIODSUB11>
</PERCENT_ROW>
<PERCENT_ROW>
<YEAR>2007</YEAR>
<PERIOD>3</PERIOD>
<MATERIAL_TYPE>C</MATERIAL_TYPE>
<BRANCHDESC>Twin Falls</BRANCHDESC>
<LOCATION>34</LOCATION>
<QUARTERDESC>Quarter 1</QUARTERDESC>
<CURRPERIOD>Mar 2007</CURRPERIOD>
<VALUECURRENTPERIOD>100</VALUECURRENTPERIOD>
<QUARTERVALUE>99.8</QUARTERVALUE>
<YTDVALUE>99.8</YTDVALUE>
<STDCURRENTPERIOD>100</STDCURRENTPERIOD>
<VARIANCE_STD>0</VARIANCE_STD>
<VARIANCE_STD_PERCENT>0</VARIANCE_STD_PERCENT>
<CURRENT_12MMA>99.8</CURRENT_12MMA>
<PRIOR_12MMA>0</PRIOR_12MMA>
<CURRPERSUB1>Feb 2007</CURRPERSUB1>
<VALUECURRENTPERIODSUB1>99.4</VALUECURRENTPERIODSUB1>
<CURRPERSUB2>Jan 2007</CURRPERSUB2>
<VALUECURRENTPERIODSUB2>100</VALUECURRENTPERIODSUB2>
<CURRPERSUB3>Dec 2006</CURRPERSUB3>
<VALUECURRENTPERIODSUB3>0</VALUECURRENTPERIODSUB3>
<CURRPERSUB4>Nov 2006</CURRPERSUB4>
<VALUECURRENTPERIODSUB4>0</VALUECURRENTPERIODSUB4>
<CURRPERSUB5>Oct 2006</CURRPERSUB5>
<VALUECURRENTPERIODSUB5>0</VALUECURRENTPERIODSUB5>
<CURRPERSUB6>Sep 2006</CURRPERSUB6>
<VALUECURRENTPERIODSUB6>0</VALUECURRENTPERIODSUB6>
<CURRPERSUB7>Aug 2006</CURRPERSUB7>
<VALUECURRENTPERIODSUB7>0</VALUECURRENTPERIODSUB7>
<CURRPERSUB8>Jul 2006</CURRPERSUB8>
<VALUECURRENTPERIODSUB8>0</VALUECURRENTPERIODSUB8>
<CURRPERSUB9>Jun 2006</CURRPERSUB9>
<VALUECURRENTPERIODSUB9>0</VALUECURRENTPERIODSUB9>
<CURRPERSUB10>May 2006</CURRPERSUB10>
<VALUECURRENTPERIODSUB10>0</VALUECURRENTPERIODSUB10>
<CURRPERSUB11>Apr 2006</CURRPERSUB11>
<VALUECURRENTPERIODSUB11>0</VALUECURRENTPERIODSUB11>
</PERCENT_ROW>
<PERCENT_ROW>
<YEAR>2007</YEAR>
<PERIOD>3</PERIOD>
<MATERIAL_TYPE>C</MATERIAL_TYPE>
<BRANCHDESC>Spanish Fork</BRANCHDESC>
<LOCATION>35</LOCATION>
<QUARTERDESC>Quarter 1</QUARTERDESC>
<CURRPERIOD>Mar 2007</CURRPERIOD>
<VALUECURRENTPERIOD>7.7</VALUECURRENTPERIOD>
<QUARTERVALUE>10.2</QUARTERVALUE>
<YTDVALUE>10.2</YTDVALUE>
<STDCURRENTPERIOD>-6016.2</STDCURRENTPERIOD>
<VARIANCE_STD>-6023.9</VARIANCE_STD>
<VARIANCE_STD_PERCENT>100.1</VARIANCE_STD_PERCENT>
<CURRENT_12MMA>10.23</CURRENT_12MMA>
<PRIOR_12MMA>0</PRIOR_12MMA>
<CURRPERSUB1>Feb 2007</CURRPERSUB1>
<VALUECURRENTPERIODSUB1>14.9</VALUECURRENTPERIODSUB1>
<CURRPERSUB2>Jan 2007</CURRPERSUB2>
<VALUECURRENTPERIODSUB2>8.1</VALUECURRENTPERIODSUB2>
<CURRPERSUB3>Dec 2006</CURRPERSUB3>
<VALUECURRENTPERIODSUB3>0</VALUECURRENTPERIODSUB3>
<CURRPERSUB4>Nov 2006</CURRPERSUB4>
<VALUECURRENTPERIODSUB4>0</VALUECURRENTPERIODSUB4>
<CURRPERSUB5>Oct 2006</CURRPERSUB5>
<VALUECURRENTPERIODSUB5>0</VALUECURRENTPERIODSUB5>
<CURRPERSUB6>Sep 2006</CURRPERSUB6>
<VALUECURRENTPERIODSUB6>0</VALUECURRENTPERIODSUB6>
<CURRPERSUB7>Aug 2006</CURRPERSUB7>
<VALUECURRENTPERIODSUB7>0</VALUECURRENTPERIODSUB7>
<CURRPERSUB8>Jul 2006</CURRPERSUB8>
<VALUECURRENTPERIODSUB8>0</VALUECURRENTPERIODSUB8>
<CURRPERSUB9>Jun 2006</CURRPERSUB9>
<VALUECURRENTPERIODSUB9>0</VALUECURRENTPERIODSUB9>
<CURRPERSUB10>May 2006</CURRPERSUB10>
<VALUECURRENTPERIODSUB10>0</VALUECURRENTPERIODSUB10>
<CURRPERSUB11>Apr 2006</CURRPERSUB11>
<VALUECURRENTPERIODSUB11>0</VALUECURRENTPERIODSUB11>
</PERCENT_ROW>
</DATA>
Note that each Branch_Desc has 12 periods called CURRPERIOD,CURPERSUB1,CURPERSUB2 ...... and 12 values for those periods as VALUECURRENTPERIOD, VALUECURRENTPERIODSUB1, VALUECURRENTPERIODSUB2......
I need to create a Line Graph for each Branch for the 12 periods as defined above where VALUECURRENTPERIOD, VALUECURRENTPERIODSUB1 etc. are the values for that period. The current BIPublisher Chart tool only allows one Value and One Label. In my case I have 12 VALUES (VALUECURRENTPERIOD etc.) and 12 LABELS (CURRPERIOD, CURPERSUB1 etc.). The SERIES or LEGEND should be the Branch Desc . So what I am looking for is to plot values(12 values) for 6 branches (so six lines) over a period of time (12 periods).

Hi Tim,
We have this XML data calculated from several tables where the layout was in the format of One account(a Branch in this case) and 12 periodic values for the same . So reformatting the XML is not going to be easy as the source data is like this itself. I tried un-pivioting the table (as this one is already pivoted) but it looks like Oracle doesn't support this feature yet, but is suported in DB2 or SQL. Please take a look at this link
http://blogs.ittoolbox.com/database/technology/archives/unpivot-query-12798?close=true
So I am stuck with the data in this format and users want a line graph for each branch over he period of time. May be somone on this forum can figure out how to un-pivot a table in Oracle. Thanks for your help in advance.

Similar Messages

  • I need help with Creating Key Pairs

    Hello,
    I need help with Creating Key Pairs, I generate key pais with aba provider, but the keys generated are not base 64.
    the class is :
    import java.io.*;
    import java.math.BigInteger;
    import java.security.*;
    import java.security.spec.*;
    import java.security.interfaces.*;
    import javax.crypto.*;
    import javax.crypto.spec.*;
    import au.net.aba.crypto.provider.ABAProvider;
    class CreateKeyPairs {
    private static KeyPair keyPair;
    private static KeyPairGenerator pairGenerator;
    private static PrivateKey privateKey;
    private static PublicKey publicKey;
    public static void main(String[] args) throws Exception {
    if (args.length != 2) {
    System.out.println("Usage: java CreateKeyParis public_key_file_name privete_key_file_name");
    return;
    createKeys();
    saveKey(args[0],publicKey);
    saveKey(args[1],privateKey);
    private static void createKeys() throws Exception {
    Security.addProvider(new ABAProvider());
    pairGenerator = KeyPairGenerator.getInstance("RSA","ABA");
    pairGenerator.initialize(1024, new SecureRandom());
    keyPair = pairGenerator.generateKeyPair();
    privateKey = keyPair.getPrivate();
    publicKey = keyPair.getPublic();
    private synchronized static void saveKey(String filename,PrivateKey key) throws Exception {
    ObjectOutputStream out= new ObjectOutputStream(new FileOutputStream(filename));
    out.writeObject(key);
    out.close();
    private synchronized static void saveKey(String filename,PublicKey key) throws Exception {
    ObjectOutputStream out= new ObjectOutputStream( new FileOutputStream(filename));
    out.writeObject(key);
    out.close();
    the public key is:
    �� sr com.sun.rsajca.JSA_RSAPublicKeyrC��� xr com.sun.rsajca.JS_PublicKey~5< ~��% L thePublicKeyt Lcom/sun/rsasign/p;xpsr com.sun.rsasign.anm����9�[ [ at [B[ bq ~ xr com.sun.rsasign.p��(!g�� L at Ljava/lang/String;[ bt [Ljava/lang/String;xr com.sun.rsasign.c�"dyU�|  xpt Javaur [Ljava.lang.String;��V��{G  xp   q ~ ur [B���T�  xp   ��ccR}o���[!#I����lo������
    ����^"`8�|���Z>������&
    d ����"B��
    ^5���a����jw9�����D���D�)�*3/h��7�|��I�d�$�4f�8_�|���yuq ~
    How i can generated the key pairs in base 64 or binary????
    Thanxs for help me
    Luis Navarro Nu�ez
    Santiago.
    Chile.
    South America.

    I don't use ABA but BouncyCastle
    this could help you :
    try
    java.security.Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider());
    java.security.KeyPairGenerator kg = java.security.KeyPairGenerator.getInstance("RSA","BC");
    java.security.KeyPair kp = kg.generateKeyPair();
    java.security.Key pub = kp.getPublic();
    java.security.Key pri = kp.getPrivate();
    System.out.println("pub: " + pub);
    System.out.println("pri: " + pri);
    byte[] pub_e = pub.getEncoded();
    byte[] pri_e = pri.getEncoded();
    java.io.PrintWriter o;
    java.io.DataInputStream i;
    java.io.File f;
    o = new java.io.PrintWriter(new java.io.FileOutputStream("d:/pub64"));
    o.println(new sun.misc.BASE64Encoder().encode(pub_e));
    o.close();
    o = new java.io.PrintWriter(new java.io.FileOutputStream("d:/pri64"));
    o.println(new sun.misc.BASE64Encoder().encode(pri_e));
    o.close();
    java.io.BufferedReader br = new java.io.BufferedReader(new java.io.FileReader("d:/pub64"));
    StringBuffer keyBase64 = new StringBuffer();
    String line = br.readLine ();
    while(line != null)
    keyBase64.append (line);
    line = br.readLine ();
    byte [] pubBytes = new sun.misc.BASE64Decoder().decodeBuffer(keyBase64.toString ());
    br = new java.io.BufferedReader(new java.io.FileReader("d:/pri64"));
    keyBase64 = new StringBuffer();
    line = br.readLine ();
    while(line != null)
    keyBase64.append (line);
    line = br.readLine ();
    byte [] priBytes = new sun.misc.BASE64Decoder().decodeBuffer(keyBase64.toString ());
    java.security.KeyFactory kf = java.security.KeyFactory.getInstance("RSA","BC");
    java.security.Key pubKey = kf.generatePublic(new java.security.spec.X509EncodedKeySpec(pubBytes));
    System.out.println("pub: " + pubKey);
    java.security.Key priKey = kf.generatePrivate(new java.security.spec.PKCS8EncodedKeySpec(priBytes));
    System.out.println("pri: " + priKey);
    catch(Exception e)
    e.printStackTrace ();
    }

  • I need help with creating PDF with Preview...

    Hello
    I need help with creating PDF documetns with Preview. Just a few days ago, I was able to create PDF files composed of scanned images (notes) and everything worked perfectly fine. However, today I was having trouble with it. I scanned my notebook and saved 8 images/pages in jpeg format. I did the usual routine with Preview (select all files>print>PDF>save as PDF>then save). Well this worked a few days ago, but when I tried it today, I was able to save it, but the after opening the PDF file that I have saved, only the first page was there. The other pages weren't included. I really don't see anything wrong with what I'm doing. I really need help. Any help would be greatly appreciated.

    I can't find it.  I went into advanced and then document processing but no batch sequence is there and everything is grayed out.
    EDIT: I realized that you cant do batch sequences in standard.  Any other ideas?

  • Need help with creating a brush

    Hi guys,
    I wanted to ask for help with creating a brush (even a link to a tutorial will be goon enough ).
    I got this sample:
    I've created a brush from it, and i'm trying to get this kind of result:
    but it's only duplicates it and gives me this result:
    Can someone help me please understand what i need to define in order to make the brush behave like a continues brush instead of duplicate it?
    Thank you very much
    shlomit

    what you need to do is make a brush that looks like the tip of a brush. photoshop has several already but you can make your own that will be better.
    get a paintbrush and paint a spot kind of like what you did but dont paint a stroke. make it look kindof grungy. then make your brush from that, making sure to desaturate it and everything.
    EDIT:
    oh, and if you bring the fill down to like 10-20% your stroke will look better

  • I need help with creating some formulas

    I'm not sure if anyone around here can help me, but I'm trying to create a Numbers document and need some help with creating a formula/function.
    I have a column of amounts and I would like to create a formula which deducts a percentage (11.9%) and puts the result in another column.
    If anyone can help me, it would be greatly appreciated.

    Here is an example that shows one way to do this:
    The original data is in column A.  In column B we will store formulas to adjust the amounts:
    1) select the cell where you want to formula (in this case cell B2)
    2) Type the "=" (equal sign):
    3) click cell A2:
    4) now type the rest of the formula which is: "*(100-11.9)/100"  that is asterisk, then open parenthesis, 100 minus eleven point nine close parenthesis forward slash  one hundred
    The Asterisk is the multiply operator  (times) and the forward slash is the division operator (divide)
    now hit return.  select cell B2 and hover the cursor over the bottom edge of the cell:
    drag the little yellow dot down to "fill" the formula down as needed.

  • Need help in creating a Waterfall Chart

    Hi,
    I have a requirement where in which I need to create a waterfall chart. In this chart we need the sales value for a Brand for two years, (say 2010 and 2009) and also need to plot the growth of the various sub-brands that come under that brand. Some dummy
    data to explain my scenario follows.
    MAT 09
    MAT 10
    Brand
    1400
    1450
    Sub Brand 1
    300
    400
    Sub Brand 2
    400
    500
    Sub Brand 3
    500
    300
    Sub Brand 4
    100
    50
    Sub Brand 5
    100
    200
    In my chart it has to be a vertical bar chart, 1st line should be MAT 09, then the growth values should be plotted, but the axis for that will not be 0, rather start at the value of MAT09.
    I am unable to paste a dummy chart here. :(
    Can anyone throw any inputs as to how it can be achieved.
    Thanks in Advance,
    Suman Sarkar

    Hi Suman Sarkar,
    I am a little confused about the layout of your waterfall chart, could you please post some dummy chart here, with a clear
    understanding with the issue, we could give some solution or workarounds, the steps of uploading the picture are following:
    1.      
    Upload the picture to a website
    http://skydriver.live.com 
    2.      
    View the picture in the website.
    3.      
    Right-click the picture, and then select “Copy”
    4.      
    In reply window, select “Paste” to paste the picture into a post.
    If you have any question about the steps, please feel free to ask.
    Regards,
    Challen Fu

  • Need help with creating template. Changes are not going through to index.html page

    Hi all,
    I have an issue with my template that I am creating and also a question about creating template Regions (Repeating and Editable).
    Somehow my changes to my index.dwt are not changing my index.html page.
    Also my other question is: For my top navigation bar and left navigation bar links, do I need to select and define each individual button or link as Repeating/Editable Region? or can I just select the whole navigation bar (the one on the top) etc...
    Below are my steps for creating my template...I am kinda fairly new to using DW and this is my first attempt to making a template following the DW tutorial CD that came with DW CS3.
    I appreciate any help with this...regards, Dano
    -Open my index.html file
    -File/save as template
    -Save
    -update links - yes
    -Select Repeating and Editable Regions (I selected the whole top navigation bar and selected Repeating Region and Editable Region, same with the left side navigation links)
    -File close all
    -Open the index.dwt
    -Save as and selected the index.html and chose to overide it..
    When I make changes to my index.dwt it is not changing the index.html
    I feel that I am missing some important steps here.....
    Website address
    www.defenseproshop.com

    Figured out

  • Need help with creating text anchors with tagged text.

    Can anyone tell me how to determine the correct value for a "Hyperlink Dest Index" value?
    I have a script which creates a tagged text file that specifies about about 280 pages of tables (thank heavens for autoflow) , and would like to add live links between different parts. I can create a text anchor and a hyperlink to it in InDesign. The tagged text definition for the link source is simple and in-line and exports and imports nicely as tagged text. However, I see that all the link destinations, aka  text anchors, are all exported at the very end of the tagged text files as global definitions, and thier location iin the document is specified by the property HyperlinkDestIndex. However, I can't figure out how to set this value progammatically. I've spent over an hour exporting links, and it sure isn't anything as obvious as character index in the story.
    Any advice appreciated,
      Read Roberts

    Read, I'm not sure the following is going to help you. It works for external hyperlinks, but you want internal links, right? Anyway, it might give you some clues.
    A funny thing: I was reviewing some script where I got links to work, and I spotted a tiny coding error. Links seemed to be defined by two separate identifiers: a "link name", which is what appears in Edit Hyperlink dialog, and a "Dest Key", which seems to be a simple increasing number. However, due to aformentioned coding error, the dest keys between the actual link and its definition were off by '1', so there was no way that ought to have matched. But it still worked! So "Dest Key" is a red herring ...
    As far as I understand, it works like this (for hyperlinks): in your text, you have
    HplName -- this is actually the 'title' that appears in the Hyperlink palette
    HplDest -- this is the 'internal name'
    DestKey. Hm. Perhaps you could omit this, per above obsvn.
    CharStyleRef, the name of the auto-applied style
    Hid -- seems to be always '0'
    HplOff: the "offset" from this entire command to the start of the hyperlink, in InDesign characters.
    HplLen: the "length" from the hyperlinked text, in InDesign characters.
    and in the list of 'proper' definitions, those that appear at the very end of your file:
    HplDestDfn -- the internal name again
    DestKey -- see above
    HplDestUrl -- finally! A real URL! (But you must escape lots of characters, such as the forward slash and colon.)
    Hid -- again, always seems to be '0'.
    Some of these items are perhaps optional, but experimenting with what may be left out only lead to frustration The Tagged Text guide is far from complete, as I'm sure you already knew.
    As noted, some (or all) of the named items need a backslash escape for a few characters, but I can't find a definitive way to determine in advance what is 'good' and what is 'not good'.
    The following script creates a Tagged Text file with a couple of working hyperlinks in it -- I don't know if this is of any help for your internal links.
    var hyperlinkDest = [];
    var text = "This is some text with a link [http://www.jongware.com/idjshelp.html] and another one [http://forums.adobe.com/thread/1014617?tstart=0] in it.";
    var tagtext = text.replace (/\[(.+?)\]/g, function (full, match)
                        return makelink (match, 'title:'+match, match, match);
    // When done processing plain text, add the destinations at the end:
    tagtext += hyperlinkDest.join('');
    tagFile = File(Folder.myDocuments+'/__tmp.txt');
    if (tagFile.open('w') == false)
              alert ("Unable to create temporary file!");
              exit();
    if (File.fs == "Windows")
              tagFile.write ("<ASCII-WIN>\n");
    else
              tagFile.write ("<ASCII-MAC>\n");
    tagFile.write ("<dcs:HYPERLINK=<cu:1>>\n");
              tagFile.write (tagtext);
    tagFile.close();
    // 'text' is the actual text that will be clickable
    // 'title' is what will appear in the Hyperlinks palette
    // 'name' is the internal name in the Edit Hyperlink dialog
    // 'url' is the actual URL that will be linked to
    function makelink (text, title, name, url)
              var destkey = hyperlinkDest.length;
              // In URL you must escape forward slashes and colons
              // .. and some other characters as well, by the way. There seems to be no list
              url = url.replace(/\//g, '\\/').replace(/:/g, '\\:');
              hyperlinkDest.push ('<HplDestDfn:=<HplDestName:'+name+'><DestKey:'+String(destkey)+'><HplDestUrl:'+url+'><Hid:0>>');
              return '<Hpl:=<HplName:'+title+'><HplDest:'+name+'><DestKey:'+String(destkey)+'><CharStyleRef:HYPERLINK><Hid:0><Brdrv:0><HplOff:0><HplLen:'+String(text.length)+'>>'+text;

  • Need help with creating custom form

    hi all,
    i'm working on creating a new form. it has 2 blocks for 2 tables. headers and lines tables. the headers table mostly have columns that are id's from other tables. i.e. customer_id, location_id etc.. in my screen, obviously i would not show the id's. i'll display the descriptions / names of the id's instead like customer_name for customer_id... but in order to do this i created a table that joins more than 2 tables. so in the block query data source name, i enter the name of this view.. then i add a ON-INSERT, ON-UPDATE, ON-DELETE triggers at block level and i call the corresponding package which does the insert, update and delete. i'm able to insert but update and delete causes a problem. "ORA-01445: cannot select ROWID from, or sample, a join.. ".. i'm thinking the reason is that when the form does an update or delete, it locks the record which causes the error.. also the reason i need the view is because i need to be able to query the customer_name in the screen instead of the customer_id... what i can't figure out is how i can make this work... or a work-around may be...
    can anyone help.
    thanks

    Matt Rasmussen wrote:
    You're right that the form is locking the record so you just need to control how it locks the record with an on-lock trigger. From the Oracle Applications Developer's Guide:
    page 3-9:
    When basing a block on a view, you must code ON–INSERT, ON–UPDATE, ON–DELETE, and ON–LOCK triggers to insert, update, delete, and lock the root table instead of the view.
    Most of the on-lock triggers I have written follow this template:
    <pre>     SELECT     field1, field2, field3
         INTO     :block.field3, :block.field2, :block.field3
         FROM     view
         WHERE     rowid = :block.row_id
         FOR UPDATE OF field1, field2, field3;</pre>
    I think once you've added this trigger, your form will work the way you want it.hi,
    i tried your suggestion but still get the same error.. anyways, here are the details of what i have so far.
    here's my table.
    CREATE TABLE XXPN_VR_VOL_HEADERS_ALL
      VOL_HEADER_ID     NUMBER,
      CUSTOMER_ID       NUMBER,
      LEASE_ID          NUMBER,
      LOCATION_ID       NUMBER,
      VAR_RENT_ID       NUMBER,
      PERIOD_SET_NAME   VARCHAR2(15 BYTE),
      PERIOD_NAME       VARCHAR2(15 BYTE),
      IMPORT_FLAG       VARCHAR2(1 BYTE),
      IMPORT_DATE       DATE,
      CALC_TYPE         VARCHAR2(30 BYTE),
      PASSTHROUGH_FLAG  VARCHAR2(1 BYTE),
      COMMENTS          VARCHAR2(2000 BYTE),
      CREATED_BY        NUMBER,
      CREATION_DATE     DATE,
      LAST_UPDATED_BY   NUMBER,
      LAST_UPDATE_DATE  DATE
    );here's my view.
    create or replace view xxpn_vr_vol_headers_v ( row_id
                                                  ,vol_header_id
                                                  ,customer_id
                                                  ,customer_name
                                                  ,lease_id
                                                  ,lease_name
                                                  ,lease_number
                                                  ,location_id
                                                  ,location_code
                                                  ,var_rent_id
                                                  ,var_rent_number
                                                  ,period_set_name
                                                  ,period_name
                                                  ,import_flag
                                                  ,import_date
                                                  ,calc_type
                                                  ,passthrough_flag
                                                  ,created_by
                                                  ,creation_date
                                                  ,comments
                                                  ,last_updated_by
                                                  ,last_update_date )
    as
      select xvvha.rowid
            ,xvvha.vol_header_id
            ,xvvha.customer_id
            ,hp.party_name
            ,xvvha.lease_id
            ,pl.name
            ,pl.lease_num
            ,xvvha.location_id
            ,loc.location_code
            ,xvvha.var_rent_id
            ,pvr.rent_num
            ,xvvha.period_set_name
            ,xvvha.period_name
            ,xvvha.import_flag
            ,xvvha.import_date
            ,xvvha.calc_type
            ,xvvha.passthrough_flag
            ,xvvha.created_by
            ,xvvha.creation_date
            ,xvvha.comments
            ,xvvha.last_updated_by
            ,xvvha.last_update_date
        from xxpn_vr_vol_headers_all xvvha
            ,hz_parties hp
            ,pn_leases_all pl
            ,pn_locations_all loc
            ,pn_var_rents_v pvr
       where -1 = -1
         and xvvha.customer_id = hp.party_id (+)
         and xvvha.lease_id = pl.lease_id (+)
         and xvvha.location_id = loc.location_id (+)
         and xvvha.var_rent_id = pvr.var_rent_id (+);here's my ON-UPDATE trigger block level
    begin
      xxpn_vr_vol_data_pkg.update_vr_vol_hdr_data ( p_vol_header_id     => :XXPNVRVOLHDRS.vol_header_id
                                                   ,p_customer_id       => :XXPNVRVOLHDRS.customer_id
                                                   ,p_lease_id          => :XXPNVRVOLHDRS.lease_id
                                                   ,p_location_id       => :XXPNVRVOLHDRS.location_id
                                                   ,p_var_rent_id       => :XXPNVRVOLHDRS.var_rent_id
                                                   ,p_period_set_name   => :XXPNVRVOLHDRS.period_set_name
                                                   ,p_period_name       => :XXPNVRVOLHDRS.period_name
                                                   ,p_import_flag       => :XXPNVRVOLHDRS.import_flag
                                                   ,p_passthrough_flag  => :XXPNVRVOLHDRS.passthrough_flag
                                                   ,p_comments          => :XXPNVRVOLHDRS.comments
                                                   ,x_last_updated_by   => :XXPNVRVOLHDRS.last_updated_by
                                                   ,x_last_update_date  => :XXPNVRVOLHDRS.last_update_date );
    end;here's my code in ON-LOCK trigger block level
    begin
      select lease_id
            ,lease_name
            ,lease_number
            ,location_id
            ,location_code
            ,customer_id
            ,customer_name
            ,var_rent_id
            ,var_rent_number
            ,period_name
            ,comments
            ,period_set_name
            ,import_flag
            ,passthrough_flag
            ,created_by
            ,creation_date
            ,last_updated_by
            ,last_update_date
        into :XXPNVRVOLHDRS.lease_id
            ,:XXPNVRVOLHDRS.lease_name
            ,:XXPNVRVOLHDRS.lease_number
            ,:XXPNVRVOLHDRS.location_id
            ,:XXPNVRVOLHDRS.location_code
            ,:XXPNVRVOLHDRS.customer_id
            ,:XXPNVRVOLHDRS.customer_name
            ,:XXPNVRVOLHDRS.var_rent_id
            ,:XXPNVRVOLHDRS.var_rent_number
            ,:XXPNVRVOLHDRS.period_name
            ,:XXPNVRVOLHDRS.comments
            ,:XXPNVRVOLHDRS.period_set_name
            ,:XXPNVRVOLHDRS.import_flag
            ,:XXPNVRVOLHDRS.passthrough_flag
            ,:XXPNVRVOLHDRS.created_by
            ,:XXPNVRVOLHDRS.creation_date
            ,:XXPNVRVOLHDRS.last_updated_by
            ,:XXPNVRVOLHDRS.last_update_date
        from xxpn_vr_vol_headers_v
       where rowid = :XXPNVRVOLHDRS.ROW_ID
         for update of lease_id
                      ,lease_name
                      ,lease_number
                      ,location_id
                      ,location_code
                      ,customer_id
                      ,customer_name
                      ,var_rent_id
                      ,var_rent_number
                      ,period_name
                      ,comments
                      ,period_set_name
                      ,import_flag
                      ,passthrough_flag
                      ,created_by
                      ,creation_date
                      ,last_updated_by
                      ,last_update_date;
    end;properties for the block
    Query Data Source Type: Table
    Query Data Source Name: XXPN_VR_VOL_HEADERS_V
    DML Target Type: Table
    DML Target Name: XXPN_VR_VOL_HEADERS_V
    i'd appreciate any help.
    thanks

  • Need Help with command line arguments for a class method

    Hey guys,
    I'm fairly new to programming in java.
    I want to a write a class method that adds up its command line arguments which are numbers. For example, if the input was .... 5 2 3....then the output would be 10.
    I have been told to use the Convert to convert a string to a double. I'm ok for writing the class method but I have no idea how to use Convert and why I need it in the method.
    Can anybody help please?

    Hey guys,
    I'm fairly new to programming in java.
    I want to a write a class method that adds up its
    command line arguments which are numbers. For
    example, if the input was .... 5 2 3....then the
    output would be 10.Okay. So you would receive the numbers to add as the String[] argument to a main method. The steps are simple:
    1) declare a variable for the count
    2) for each String in the array:
    2.1) extract the value as a double
    2.2) add this to the count
    3) output the resulting count
    I have been told to use the Convert to convert a
    string to a double.
    I'm ok for writing the class
    method but I have no idea how to use ConvertThere is no class Convert in the Java API.
    and why
    I need it in the method. Do you understand you need to somehow convert each String to a double (step 2.1)? Since Convert is unknown to me, maybe you should just take a look at class Double. It can help you do step 2.1, the rest should be trivial enough.
    http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Double.html
    Give it a go and feel free to post back with a specific problem you are having, accurately described if you please :-)

  • Need help with SQL for Pie Chart

    I am trying to create a pie charge which would have 3 slices.
    Following sql gives me the expected values when I run the sql command:
    select
    round(avg(CATEGORY_1 + CATEGORY_2 + CATEGORY_3 + CATEGORY_4 + CATEGORY_5),0) "OD Engagements",
    round(avg(CATEGORY_6 + CATEGORY_7 + CATEGORY_13),0) "Talent Engagements",
    round(avg(CATEGORY_8 + CATEGORY_9 + CATEGORY_10 + CATEGORY_11 + CATEGORY_12),0) "Other Engagements"
    from OTD_PROJECT
    where STATUS in ('Open','Hold')
    I get 3 columns labeled: OD Engagements, Talent Engagements and Other Engagements with the correct averages based on the the data.
    I have tried several ways to try to get this to work in the SQL for a pie chart, but keep getting the invalid sql message and it won't save. I also tried saving without validation, but no data is shown on the chart at all.
    I want to have a pie, with 3 slices, one labeled OD Engagements with a value of 27, one labeled Talent Engagements with a value of 43 and one labeled Other Engagements with a value of 30. Then I want to be able to click on each pie slice to drill down to a secondary pie chart that shows the breakdown based on the categories included in that type.
    Since I am not grouping based on an existing field I an unsure what the link and label values should be in the chart sql.

    You'll need something like the below. I have no idea what the URL for the drilldown needs to be. It should create an appropriate link in your app for the particular slice. Mainly the code below breaks the SQL results into three rows rather than three columns. It may well have a syntax error since I can't test.
    select linkval  AS LINK,
           title    AS LABEL,
           calc_val AS VALUE
    FROM   (SELECT 'OD Engagements' AS title,
                   round(avg(CATEGORY_1 + CATEGORY_2 + CATEGORY_3 + CATEGORY_4 + CATEGORY_5),0) AS calc_val,
                   'f?p=???:???:' || v('APP_SESSION') || '::NO:?' AS LINKVAL
            from   OTD_PROJECT
            where  STATUS in ('Open','Hold')
            UNION ALL
            SELECT 'Talent Engagements' AS title,
                   round(avg(CATEGORY_6 + CATEGORY_7 + CATEGORY_13),0) AS calc_val,
                   'f?p=???:???:' || v('APP_SESSION') || '::NO:?' AS LINKVAL
            from   OTD_PROJECT
            where  STATUS in ('Open','Hold')
            UNION ALL
            SELECT 'Other Engagements' AS title,
                   round(avg(CATEGORY_8 + CATEGORY_9 + CATEGORY_10 + CATEGORY_11 + CATEGORY_12),0) AS calc_val,
                   'f?p=???:???:' || v('APP_SESSION') || '::NO:?' AS LINKVAL
            from   OTD_PROJECT
            where  STATUS in ('Open','Hold')
           );

  • Need help with in-line HTML code

    I am trying to write some in-line HTML code to change the background color to blue for Exception-Bad.  Here is my code
    I am trying to use in-line HTML code in WAD to change the background color for Exceptions-Bad to blue.  This is not working.  I really need to get this to work so if someone could tell what is wrong with my code, I would really appreciate the help.
                <style type="text/css" > SAPBEXexcBad7 {background-color: blue}; .SAPBEXexcBad8 {background-color: blue}; SAPBEXexcBad9 {background-color: blue} </style>
    Thanks.
    Ryan

    Hi Boater,
    HTML code will also come like this also
    BODY BACKGROUND="image.jpg" BGCOLOR="#FFFFFF" TEXT="#000000"
    let this one also
    Regards
    Ashwin

  • Need help with creating invoice and list of invoices

    Hello everybody,
    I need to create Credit / Debit memo invoices and for this I try to use FM GN_INVOICE_CREATE in my Z program, please let me know if it is correct way to go?
    As well I need to create list of Credit / Debit memo invoices, how to achieve this?
    Thanks in advance.
    Usefull answers will be awarded.
    Regards, M.

    You can use RV_INVOICE_CREATE for credit memo and debit memo
    list of credit and debit memo - use this FM - RV_INVOICE_LIST_CREATE
    see the below sample code
    refresh: XKOMFK, XKOMV,
               XTHEAD, XVBFS,
               XVBPA,  XVBRK,
               XVBRP,  XVBSS.
      clear  : XKOMFK, XKOMV,
               XTHEAD, XVBFS,
               XVBPA,  XVBRK,
               XVBRP,  XVBSS,
               VBSK_I.
      VBSK_I-SMART = 'F'.
      XKOMFK-VBELN =  v_deliv.
      XKOMFK-VBTYP = 'J'.
      APPEND XKOMFK.
      CALL FUNCTION 'RV_INVOICE_CREATE'
           EXPORTING
                VBSK_I       = VBSK_I
                WITH_POSTING = 'C'
           TABLES
                XKOMFK       = XKOMFK
                XKOMV        = XKOMV
                XTHEAD       = XTHEAD
                XVBFS        = XVBFS
                XVBPA        = XVBPA
                XVBRK        = XVBRK
                XVBRP        = XVBRP
                XVBSS        = XVBSS.
      if sy-subrc eq 0.
        COMMIT WORK.
       flag = 'X'.
      else.
      message i011 with p_vbeln.
      endif.
    Reward Points if it is helpful
    Thanks
    Seshu

  • Help with creating basic flow-charting app

    Hello,
    Warning: I am a Total Flex Newbie, but experienced programmer (C#, Ruby/Rails, ...)
    I am coming up to speed with Flex and want to dive in and improve my proficiency by creating a basic flow-charting app.
    The app will consist of a canvas plus a limited set of resize-able objects that will reside in a "tools" container.   These objects can be selected, dragged onto the canvas, connected to each other using a "connector" object -- either straight or right-angled lines, with the ability to be moved around the canvas while retaining their connections.
    That's it.
    I have been searching the forums and the web for pointers on how to start; but while I have found many related posts, I have not found enough to get me started.
    I would appreciate any pointers to example code or tutorials on how to approach/get started on this app.
    Thanks in advance!
    Dondi.

    Hi there, you can check out Chet Haase app Top Drawer, this app has a lot of the functionality that you want I think,
    http://graphics-geek.blogspot.com/search?q=top+drawer

  • Need help with create trigger based on more then 1 table and join.

    Hello,
    Here i have 3 tables
    1. Employee
    PERSON_ID
    1
    1
    N
    NUMBER
    None
    ORG_ID
    2
    N
    NUMBER
    Frequency
    LOC_ID
    3
    N
    NUMBER
    Frequency
    JOB_ID
    4
    Y
    NUMBER
    Height Balanced
    FLSA_STATUS_ID
    5
    Y
    NUMBER
    Frequency
    FULL_NAME
    6
    N
    VARCHAR2 (250 Byte)
    Height Balanced
    FIRST_NAME
    7
    N
    VARCHAR2 (20 Byte)
    Height Balanced
    MIDDLE_NAME
    8
    Y
    VARCHAR2 (60 Byte)
    Height Balanced
    LAST_NAME
    9
    N
    VARCHAR2 (40 Byte)
    Height Balanced
    PREFERRED_NAME
    10
    Y
    VARCHAR2 (80 Byte)
    None
    EMAIL
    11
    Y
    VARCHAR2 (250 Byte)
    None
    MAILSTOP
    12
    Y
    VARCHAR2 (100 Byte)
    None
    HIRE_DATE
    13
    N
    DATE
    None
    2. ems_candidate
    EMS_CANDIDATE_ID
    1
    1
    N
    NUMBER
    None
    EMS_JOB_ID
    2
    Y
    NUMBER
    Frequency
    NAME
    3
    N
    VARCHAR2 (255 Byte)
    Frequency
    EMAIL
    4
    Y
    VARCHAR2 (255 Byte)
    None
    TELEPHONE
    5
    Y
    VARCHAR2 (25 Byte)
    None
    EMS_SOURCE_ID
    6
    Y
    NUMBER
    Frequency
    RECEIVED_DATE
    7
    Y
    DATE
    Frequency
    COMMENTS
    8
    Y
    VARCHAR2 (4000 Byte)
    None
    3. employee_resources
    EMP_RES_ID
    1
    1
    N
    NUMBER
    None
    PERSON_ID
    2
    Y
    NUMBER
    Height Balanced
    CANDIDATE_ID
    3
    Y
    NUMBER
    Frequency
    EMP_START_DATE
    4
    Y
    DATE
    None
    CUSTOM_RESOURCE_FLAG
    5
    Y
    NUMBER (1)
    None
    RESOURCE_GROUP_ID
    6
    N
    NUMBER
    Frequency
    RESOURCE_STATUS_ID
    7
    N
    NUMBER
    Frequency
    GROUP_LOC_ID
    8
    N
    NUMBER
    Height Balanced
    ASSIGNED_JIRA
    9
    Y
    VARCHAR2 (250 Byte)
    None
    REVOKED_JIRA
    10
    Y
    VARCHAR2 (250 Byte)
    None
    CREATED_DATE
    11
    Y
    DATE
    SYSDATE
    None
    UPDATED_DATE
    12
    Y
    DATE
    None
    Now i want to create trigger when new record get inserted in employee table wanted to update person_id in employee_resources table.
    So i want to match ems_candidate.name with employee.full_name , ems_candidate.ems_job_id with employee.ems_job_id. And if it matched then update person_id in employee_resources table else through an exception and insert record in temp table.
    If anybody has an idea can u please help me.
    Thanks,
    Gayatri.

    I created below trigger
    CREATE TRIGGER emp_resources_upd_person_id
    AFTER INSERT ON ems.employee
    FOR EACH ROW
    BEGIN
        UPDATE ems.employee_resources
           SET person_id = :new.person_id
         WHERE candidate_id = (SELECT ems_candidate_id  
                                 FROM ems.ems_candidate cand, ems.employee emp
                                WHERE TRIM(UPPER(emp.first_name)) = TRIM(UPPER(SUBSTR (cand.name, 1, INSTR (cand.name, ' ') - 1)))
                                  AND TRIM(UPPER(emp.last_name)) = TRIM(UPPER(SUBSTR (cand.name,INSTR (cand.name, ' ') + 1,DECODE (INSTR (SUBSTR (cand.name, INSTR (cand.name, ' ') + 1), ' '),0,LENGTH (cand.name),(INSTR (SUBSTR (cand.name, INSTR (cand.name, ' ') + 1), ' ') - 1)))))
                                  AND emp.person_id = :new.person_id);
    EXCEPTION
      WHEN OTHERS THEN
        INSERT INTO ems.update_person_id_exception(person_id,first_name,last_name,full_name) VALUES(:new.person_id,:new.first_name,:new.last_name,:new.full_name);
    END;
    Now when i am trying to insert row in ems.employee  table it gives me an error
    ORA-04091
    table string.string is mutating, trigger/function may not see it
    Cause: A trigger (or a user defined plsql function that is referenced in this statement) attempted to look at (or modify) a table that was in the middle of being modified by the statement which fired it.
    Action: Rewrite the trigger (or function) so it does not read that table.
    Can anybody please help me to come out from these error.
    Thanks,
    Gayatri.

Maybe you are looking for

  • Set document name when use PrintToPrinter with Crystal Reports 2008

    Hy, from my application, in .net environment,  I print report on printer at runtime with PrintToPrinter command, but all documents that I print have the same spool name: "document". Is there a possibility to set this name ? Thanks Filippo

  • How do I create a workflow in salesforce?

    I want to be able to send out specific Terms and Conditions for clients to sign based on the Opportunity Record Type and the Opportunity Stage in Salesforce. We want to be able to send out our documents on an automated basis, not by clicking a button

  • Unable to grant_permission java.lang.RuntimePermission

    Hello, i am trying to use a java class within SQL plus. My class has been uploaded successfully, but when executing the method within the class i get this error: Internal exception: java.security.AccessControlException: the Permission (java.lang.Runt

  • Remove blanco line from poplist

    Hi, How do I remove a blanc line from the poplist? I've first entered 4 items in the list item property of the poplist. The insert property is set to no, required is set to yes and initial value is '0' Now I want the last item to be removed: If I sim

  • Implement a UNION clause

    Hi All, My requirement is simple. I want a Z table which combines the distinct Cost Center and Employee Pernr combination from two tables into one ztable. e.g. table 1.................................. Cost Center         Pernr A