Help with a function

I have the following records in a table
SARAPPD_PIDM     SARAPPD_TERM_CODE_ENTRY     SARAPPD_SEQ_NO     SARAPPD_APDC_CODE                   SARAPPD_APDC_DATE
2232040            200990                                                   1                       S*                                    12/03/2008 16:30:45
2232040           200990                                                  2                       D1                                    12/08/2008 07:40:52
2232040           200990                                                 3                       S*                                      03/18/2009 08:58:06
2232040           200990                                                   4                       WL                                   03/21/2009 13:53:23I need to write a function to show only if the SARAPPD_APDC_CODE code is
AND TRUNC (sarappd_apdc_date) >=
saturn_midd.utlq.f_get_adm_freeze_date
(saradap_admt_code));
This is another function...
If the sarappd_apdc_date) is <= than saturn_midd.utlq.f_get_adm_freeze_date
(saradap_admt_code));
I need to show the previous SARAPPD_APDC_CODE
In another words:
WL is the latest decision, but I can display it only if APDC date is > than      saturn_midd.utlq.f_get_adm_freeze_date
(saradap_admt_code));
THE RESULT OF THIS FUNCTION
saturn_midd.utlq.f_get_adm_freeze_date
(saradap_admt_code));
is 3/28/2009
{code|
I got this but it is not working
FUNCTION f_get_dec_freeze_date (
      p_pidm          IN   saturn_midd.sybiden.sybiden_pidm%TYPE,
      p_term_code     IN   saturn.sarappd.sarappd_term_code_entry%TYPE,
      p_coll_code_1   IN   saradap.saradap_coll_code_1%TYPE DEFAULT 'UG'
      RETURN VARCHAR2
   IS
      v_sql_text   VARCHAR2 (4000) := NULL;
      p_result     VARCHAR2 (15)   := NULL;
   BEGIN
      SELECT DISTINCT sarappd_apdc_code
                 INTO p_result
                 FROM saturn.sarappd al1,
                      saturn.saradap al2,
                      saturn.stvapdc al3
                WHERE al1.sarappd_pidm = al2.saradap_pidm
                  AND al2.saradap_term_code_entry =
                                                   al1.sarappd_term_code_entry
                  AND al1.sarappd_appl_no = al2.saradap_appl_no
                  AND al3.stvapdc_code = al1.sarappd_apdc_code
                  AND al1.sarappd_pidm = p_pidm
                  AND al1.sarappd_term_code_entry = p_term_code
                  AND al2.saradap_coll_code_1 = p_coll_code_1
                  AND al1.sarappd_seq_no =
                         (SELECT MAX (sarappd_seq_no)
                            FROM saturn.sarappd bl1,
                                 saturn.stvapdc bl3,
                                 saturn.saradap bl2
                           WHERE bl1.sarappd_pidm = al1.sarappd_pidm
                             AND bl2.saradap_pidm = bl1.sarappd_pidm
                             AND bl2.saradap_term_code_entry =
                                                   bl1.sarappd_term_code_entry
                             AND bl1.sarappd_appl_no = bl2.saradap_appl_no
                             AND bl3.stvapdc_code = bl1.sarappd_apdc_code
                             AND bl3.stvapdc_vr_msg_no = al3.stvapdc_vr_msg_no
                             AND bl1.sarappd_term_code_entry =
                                                   al1.sarappd_term_code_entry
                             AND bl1.sarappd_appl_no = al1.sarappd_appl_no
                             AND TRUNC (sarappd_apdc_date) >=
                                    saturn_midd.utlq.f_get_adm_freeze_date
                                                            (saradap_admt_code));
      RETURN p_result;
   END f_get_dec_freeze_date;Edited by: user648177 on Apr 27, 2009 2:03 PM
Edited by: user648177 on Apr 27, 2009 2:04 PM

Hi,
user648177 wrote:
SARAPPD_PIDM     SARAPPD_TERM_CODE_ENTRY     SARAPPD_SEQ_NO     SARAPPD_APDC_CODE     SARAPPD_ACTIVITY_DATE
2232040          200990      1 S* 12/03/2008 16:30:45
2232040               200990     2 D1 12/08/2008 07:40:52
2232040               200990     3 S* 03/18/2009 08:58:06
2232040               200990          4 WL 03/29/2009 13:53:23
AS you can see the WL is the last decision but that decision was made on 3/29/2009 and the freeze date is 3/29/2009, the decision date is grater than 3/28/2009
the freze date, so I need to show the previous one S* with the decision date of 03/18/2009 08:58:06Actually, I can't see. I can't see 3/28/2009 anywherre in the data.
Without the sample data from all the tables, I can only guess. I'm willing to make one guess:
You may need to use the analytic ROW_NUMBER fucntion to assign numbers to the possible rows
ROW_NUMBER () OVER
    (ORDER BY CASE
                     WHEN  sarappd_adctivity_date < freeze_date
                     THEN  sarappd_activity_date
              END
     DESC
    ) AS rnumand then pick only the row WHERE rnum = 1.
If you want to post formatted text, like query results on this site, type these 6 characters:
(small letters only, inside curly brackets) before and after formatted text, to preserve spacing.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Similar Messages

  • Help with stored function

    Hi...I was wondering if I could get help with this function. How do i write a function to return hours between a begin date and an end date for an employee. Thanks so much

    EdStevens wrote:
    AlexeyDev wrote:
    sb92075 wrote:
    select (date2-date1)*24 from dual;not as above but as below
    select (date2-date1)/24 from dual;date2-date1 is amount of days. Divide it by 24 and what? if you multiply it on 24 you will have a chance to know how many hours between these two dates. :-)Don't forget that a DATE type also includes a time component.I suppose it doesn't matter if you did a difference between two dates. The result is always number of days.

  • Help with ASO function

    Hi all,
    I need some help with ASO mdx function.
    Avg({Leaves([Employees].Currentmember)}, [Calculated_Field]). This will give me the average for Calculated_Field for all levels of Employees. But i want to add more dimensions like Region and year.
    Please advice how can I achieve this.
    Thanks
    Andy

    you have to use cross join in order to add more dimension members to the formula.This will give you some idea
    Re: Writing formula in Outline??????
    Regards,
    RSG

  • I need help with Analytic Function

    Hi,
    I have this little problem that I need help with.
    My datafile has thousands of records that look like...
    Client_Id Region Countries
    [1] [1] [USA, Canada]
    [1] [2] [Australia, France, Germany]
    [1] [3] [China, India, Korea]
    [1] [4] [Brazil, Mexico]
    [8] [1] [USA, Canada]
    [9] [1] [USA, Canada]
    [9] [4] [Argentina, Brazil]
    [13] [1] [USA, Canada]
    [15] [1] [USA]
    [15] [4] [Argentina, Brazil]
    etc
    My task is is to create a report with 2 columns - Client_Id and Countries, to look something like...
    Client_Id Countries
    [1] [USA, Canada, Australia, France, Germany, China, India, Korea, Brazil, Mexico]
    [8] [USA, Canada]
    [9] [USA, Canada, Argentina, Brazil]
    [13] [USA, Canada]
    [15] [USA, Argentina, Brazil]
    etc.
    How can I achieve this using Analytic Function(s)?
    Thanks.
    BDF

    Hi,
    That's called String Aggregation , and the following site shows many ways to do it:
    http://www.oracle-base.com/articles/10g/StringAggregationTechniques.php
    Which one should you use? That depends on which version of Oracle you're using, and your exact requirements.
    For example, is order importatn? You said the results shoudl include:
    CLIENT_ID  COUNTRIES
    1        USA, Canada, Australia, France, Germany, China, India, Korea, Brazil, Mexicobut would you be equally happy with
    CLIENT_ID  COUNTRIES
    1        Australia, France, Germany, China, India, Korea, Brazil, Mexico, USA, Canadaor
    CLIENT_ID  COUNTRIES
    1        Australia, France, Germany, USA, Canada, Brazil, Mexico, China, India, Korea?
    Mwalimu wrote:
    ... How can I achieve this using Analytic Function(s)?The best solution may not involve analytic functions at all. Is that okay?
    If you'd like help, post your best attempt, a little sample data (CREATE TABLE and INSERT statements), the results you want from that data, and an explanation of how you get those results from that data.
    Always say which version of Oracle you're using.
    Edited by: Frank Kulash on Aug 29, 2011 3:05 PM

  • Help with Sort function in Terminal

    Hello all... this is my first post on here as I'm having some trouble with some Termianl commands. I'm trying to learn Terminal at the moment as it is but I would appreciate some help with this one....
    I'm trying to sort a rather large txt file into alphabetical order and also delete any duplicates. I've been using the following command in Terminal:
    sort -u words.txt > words1.txt
    but after a while I get the following error
    sort: string comparison failed: Illegal byte sequence
    sort: Set LC_ALL='C' to work around the problem.
    sort: The strings compared were `ariadnetr\345dens\r' and `ariadnetr\345ds\r'.
    What should my initial command be? What is Set LC_ALL='C'?
    Hope you guys can help?

    Various languages distinct sorting - collation - sequences. 
    The characters can and variously do sort differently, depending on what language is involved. 
    Languages here can include the written languages of humans, and a few settings associated with programming languages.  This is all part of what is known as internationalization and localization, and there are are various documents around on that topic.
    The LC_ALL environment variable sets all of the locale-related settings en-mass, including the collation sequence that is established via LC_COLLATE et al, and the sort tool is suggesting selecting the C language collation.
    Here, the tool is suggesting the following syntax:
    LC_ALL=C sort -u words.txt > words1.txt
    This can also be done by exporting the LC_ALL, but it's probably better to just do this locally before invoking the tool.
    Also look at the lines of text in question within the files, and confirm the character encoding of the file.
    Files can have different character encodings, and there's no reliable means to guess the encoding.  For some related information, see the file command:
    file words.txt
    ...and start reading some of the materials on internationalization and localization that are posted around the 'net. Here's Apple's top-level overview.
    In this case, it looks like there's an "odd" character and probably an å character on that line and apparently the Svenska ariadnetrådens. 
    Switching collation can help here, or - if the character is not necessary - removing it via tr or replacing it via sed can be equally effective solutions. 
    Given it appears to be Svenska, it might work better to switch to Svenska collation thanto  the suggested C collation.
    I think that's going to be sv_SE, which would make the command:
    LC_ALL=sv_SE sort -u words.txt > words1.txt
    This is all generic bash shell scripting stuff, and not specific to OS X.  If you haven't already seen them, the folks over at tldp have various guides including a bash guide for beginners, and an advanced bash scripting guide - both can be worth skimming.  They're not exactly the same as bash on OS X and some specific commands and switches can differ, and as bash versions can differ, but bash is quite similar across all the platforms.

  • Help with bash function(set background=dark/light in vimrc)

    I couldn't find any gvimrc files so I guess it uses the regular one. And since I work pretty much in X too  I thought it would be nice with a function that sets background=light if I'm in X an background=dark if not. Is that possible?
    /Richard

    vimrc configuration is not the same as bash.
    You probably want something like this in your ~/.vimrc:
    if has('gui_running')
    set background=light
    else
    set background = dark
    endif

  • Help with a Function-module

    Hi again forum:
       I have a program and i need to pass basic functionality to a set of funtion module.
       I have a description of a internal table in the program, that i need to use in the function-module
    Example:
         PROGRAM
    " In the top of the program i declared.
    "This the actual version
            TYPES: BEGIN OF t1
                         END OF t1.
            DATA:  it_some TYPE STANDARD TABLE of t1 with header line.
            SELECT *
            FROM
            INTO TABLE it_some.
          FUNCTION MODULE
    Now in the new version i need to declare an output paramter of type t1 in the exports parameters of the function ZMY_FUNCTION, and t1 is an internal_table, what can i do forum ?..
    The thing is that how can i declare an export parameter that is not know?
    please help
    Thanks
    Joshua

    hi,
    we can pass internal table to FM by using CHANGING or TABLE options.
    regards,
    AshokReddy.

  • Help with Java function

    Hi all,
    I am suppose to write a java function for the following source and target structure:
    <u>Source Structure</u>
    Root A (0..unbounded)
      |_ A
    Root B (0..unbounded)
      |_ B
    Root C (0..unbounded)
      |_ C
    <u>Target Structure</u>
    Root_target (0..unbounded)
       |_ T
    Based upon every occurrence of A, B and C, i have to first compare their values and for every unique value i have to create a separate instance of 'T'
    i.e. if all the three A, B and C are different the output should be:
    Root_target (0..unbounded)
       |_ T  (for A)
    Root_target (0..unbounded)
       |_ T (for B)
    Root_target (0..unbounded)
       |_ T (for C)
    I am writing a java function in the graphical mapping for it, but i am stuck with the code to create target segments dynamically.
    Any help in this regards is appreciated.
    Regards,
    Varun

    Hi Varun,
    I understood unique values form A,B,C  need to map  to T.
    In this case change the context of  all these A,B,C to their respective parent node.
    write a user define function to accept these 3 queues , write a java logic to fiund uniqueness among all the records,  add the resulkt to Resultset , which is output map to T.
    Thanks,
    venu.

  • Need help with effect / function stop!

    Hi all!
    I tried to build some kind of custom pop-up-menu with fade
    in/out effect, however the menu sometimes (< very often, but not
    always) disappears while the mouse is still over it.
    So i defined a function to stop/abort the effects, but this
    doesn't work right.
    Could anybody please tell me, how to stop all functions,
    while the mouse is over a link?
    /// This is the container to appear / disappear:
    <div id="navislide" style="height:292px;
    overflow:hidden;">
    <a href="mylink.html" onMouseOver="killall();"
    onMouseOut="hideit();">mylink</a>
    </div>
    /// This is the link to show the container:
    <a href="#"
    onMouseOver="slidefadein.start();">mylink</a>
    <script type="text/javascript">
    function displayblock() {
    var thediv = document.getElementById('navislide');
    thediv.style.display= "block";
    slidetimer = setTimeout('slidefadeout.start();', 2000);
    hideit = function() {
    slidetimer = setTimeout('slidefadeout.start();', 2000);
    function displaynone() {
    var thediv = document.getElementById('navislide');
    thediv.style.display= "none";
    killall = function() {
    clearTimeout(slidetimer);
    slidefadeout.stop();
    slidefadein.stop();
    displayblock();
    slidefadeup.start();
    var slidefadein = new Spry.Effect.Fade("navislide", {from:0,
    to:100, toggle:false, setup:displayblock, finish:hideit});
    var slidefadeout = new Spry.Effect.Fade("navislide",
    {from:100, to:0, toggle:false, finish:displaynone});
    var slidefadeup = new Spry.Effect.Fade("navislide",
    {from:100, to:100, toggle:false});
    </script>
    Probably, its all about the "killall"-function, because when
    the mouse moves over the link, the function to abort all other
    effects, does not take effect.
    Thank you so much vor any kind of help or hint!!
    Cheers,
    idefix

    I would be most interested in a reply to this for I asked
    weeks ago how to use an onClick stop() function for the links in my
    page. I was given the stop function by VFusion (it is to stop
    panels from rotating), but I could never figure out how to actually
    get the function to stop the panels and could not get it no matter
    what I tried, eventually had to take the panel rotation out.

  • Help with log function

    Hallow experts,
    I'm doing an  interface from sap into anther  application and in this interface (log interface) I use two  function  below in program and I have to send to customer in text file in which field of infotype change was made
    This to function helping me but I miss the action like insert was made or update or delete
    Did dome one can help me with that?
    HREIC_GET_LOGGED_INFTY_CHANGES
    HR_INFOTYPE_LOG_GET_DETAIL
    Best Regards

    hi Naveen Bathini
    thankes for your answer
    i thihk u dont understand me ,
    HR_INFOTYPE_LOG_GET_DETAIL bring table fields with all the field that change
    but i dont now if user create new infotype for employee or just take one field and change it like from infotype 0006 just change street or postal code
    i wont to now if it is an insert (create new infotype ) or update or delete fields from infotype.
    Best regards

  • Help with analytical function

    I successfully use the following analytical function to sum all net_movement of a position (key for a position: bp_id, prtfl_num, instrmnt_id, cost_prc_crncy) from first occurrence until current row:
    SELECT SUM (net_movement) OVER (PARTITION BY bp_id, prtfl_num, instrmnt_id, cost_prc_crncy ORDER BY TRUNC (val_dt) RANGE BETWEEN UNBOUNDED PRECEDING AND 0 FOLLOWING) holding,
    what i need is another column to sum net_movement of a position but only for the current date, but all my approaches fail..
    - add the date (val_dt) to the 'partition by' clause and therefore sum only values with same position and date
    SELECT SUM (net_movement) OVER (PARTITION BY val_dt, bp_id, prtfl_num, instrmnt_id, cost_prc_crncy ORDER BY TRUNC (val_dt) RANGE BETWEEN UNBOUNDED PRECEDING AND 0 FOLLOWING) today_net_movement
    - take the holding for the last date and subtract it from the current holding afterwards
    SELECT SUM (net_movement) OVER (PARTITION BY bp_id, prtfl_num, instrmnt_id, cost_prc_crncy ORDER BY TRUNC (val_dt) RANGE BETWEEN UNBOUNDED PRECEDING AND -1 FOLLOWING) last_holding,
    - using lag on the analytical function which calculates holding fails too
    I also want to avoid creating a table which stores the last holding..
    Does anyone sees where I make a mistake or knows an alternative to get this value?
    It would help me much!
    Thanks in advance!

    Thank you,
    but I already tried that but it returns strange values which are not the correct ones for sure.
    It is always the same value for each row, if its not 0, and a very high one (500500 for example), even if the sum of all net_movement of that date is 0 (and the statement for holding returns 0 too)
    I also tried witch trunc(val_dt,'DDD') with the same result (without trunc it is the same issue)
    please help if you can, thanks in advance!

  • Help with existNode function

    I am using the existNode function to check whether a specific node exists or has a value for it in the XML.
    So, am using it within an IF condition as below;
    IF L_xml.existSNode('/ItemFamily/Style/Item/Attributes/ItemAttributes/ExtRefNo/text()') > 0 THEN
             DBMS_OUTPUT.PUT_LINE('L_xml = Style exists');
    END IF;
    Here L_xml is my initial XML message received which is a CLOB converted to an XMLTYPE.
    The above works fine.
    But after I do an EXTRACT operation on the above XML to get only the portion of it (from a particular start tag to its corresponding end tag), and feed this output for my existNode function as below;
        IF L_itm_xml.existSNode('/ItemFamily/Style/Item/Attributes/ItemAttributes/ExtRefNo') > 0 THEN
             DBMS_OUTPUT.PUT_LINE('itm_xml = ');
        END IF;
    It does not give me the desired output.
    I would like to know, if there is any restriction on the existNode usage.
    Am asking this coz am a bit skeptical on whether this is happening due to XML being stripped off its header.
    Could someone please help me find an answer for this.

    The sample data is as below;
    <?xml version="1.0" encoding="utf-8"?>
    <ItemFamily>
      <Style>
        <Item>
          <ParentExtRefNo>str1234</ParentExtRefNo>
          <PackInd>str1234</PackInd>
          <ItemLevel>str1234</ItemLevel>
          <TranLevel>str1234</TranLevel>
          <Diff1>str1234</Diff1>
          <Diff2>str1234</Diff2>
          <Diff3>str1234</Diff3>
          <Diff4>str1234</Diff4>
          <ItemDesc>str1234</ItemDesc>
          <ShortDesc>str1234</ShortDesc>
          <SuggRetail>str1234</SuggRetail>
          <HandlingTemp>str1234</HandlingTemp>
          <HandlingSens>str1234</HandlingSens>
          <SellableInd>str1234</SellableInd>
          <OrderableInd>str1234</OrderableInd>
          <ShipAloneInd>str1234</ShipAloneInd>
          <Dept>str1234</Dept>
          <Class>str1234</Class>
          <Subclass>str1234</Subclass>
          <Comments>str1234</Comments>
          <GiftWrapInd>str1234</GiftWrapInd>
          <CheckUDAInd>str1234</CheckUDAInd>
          <OriginalRetail>str1234</OriginalRetail>
          <LastUpdateId>str1234</LastUpdateId>
          <ForecastInd>str1234</ForecastInd>
          <Suppliers>
            <ItemSupplier>
              <Supplier>str1234</Supplier>
              <PrimarySuppInd>str1234</PrimarySuppInd>
              <VPN>str1234</VPN>
              <DirectShipInd>str1234</DirectShipInd>
              <LastUpdateId>str1234</LastUpdateId>
              <Countries>
                <SuppCountry>
                  <SuppCountryType>str1234</SuppCountryType>
                  <OriginCountryId>str1234</OriginCountryId>
                  <PrimarySupplierInd>str1234</PrimarySupplierInd>
                  <PrimaryCountryInd>str1234</PrimaryCountryInd>
                  <SuppPackSize>str1234</SuppPackSize>
                  <InnerPackSize>str1234</InnerPackSize>
                  <UnitCost>str1234</UnitCost>
                  <LastUpdateId>str1234</LastUpdateId>
                  <Dimensions>
                    <SuppCountryDim>
                      <DimType>str1234</DimType>
                      <DimObject>str1234</DimObject>
                      <Height>str1234</Height>
                      <Width>str1234</Width>
                      <Length>str1234</Length>
                      <LwhUOM>str1234</LwhUOM>
                      <Weight>str1234</Weight>
                      <NetWeight>str1234</NetWeight>
                      <WeightUOM>str1234</WeightUOM>
                      <LastUpdateId>str1234</LastUpdateId>
                    </SuppCountryDim>
                  </Dimensions>
                </SuppCountry>
              </Countries>
            </ItemSupplier>
          </Suppliers>
        </Item>
      </Style>
    </ItemFamily>
    The L_xml will have this as its value.
    The L_itm_xml will have the subset of the XML extracted from it as its value.
    As below;
        <Item>
          <ParentExtRefNo>str1234</ParentExtRefNo>
          <PackInd>str1234</PackInd>
          <ItemLevel>str1234</ItemLevel>
          <TranLevel>str1234</TranLevel>
          <Diff1>str1234</Diff1>
          <Diff2>str1234</Diff2>
          <Diff3>str1234</Diff3>
          <Diff4>str1234</Diff4>
          <ItemDesc>str1234</ItemDesc>
          <ShortDesc>str1234</ShortDesc>
          <SuggRetail>str1234</SuggRetail>
          <HandlingTemp>str1234</HandlingTemp>
          <HandlingSens>str1234</HandlingSens>
          <SellableInd>str1234</SellableInd>
          <OrderableInd>str1234</OrderableInd>
          <ShipAloneInd>str1234</ShipAloneInd>
          <Dept>str1234</Dept>
          <Class>str1234</Class>
          <Subclass>str1234</Subclass>
          <Comments>str1234</Comments>
          <GiftWrapInd>str1234</GiftWrapInd>
          <CheckUDAInd>str1234</CheckUDAInd>
          <OriginalRetail>str1234</OriginalRetail>
          <LastUpdateId>str1234</LastUpdateId>
          <ForecastInd>str1234</ForecastInd>
          <Suppliers>
            <ItemSupplier>
              <Supplier>str1234</Supplier>
              <PrimarySuppInd>str1234</PrimarySuppInd>
              <VPN>str1234</VPN>
              <DirectShipInd>str1234</DirectShipInd>
              <LastUpdateId>str1234</LastUpdateId>
              <Countries>
                <SuppCountry>
                  <SuppCountryType>str1234</SuppCountryType>
                  <OriginCountryId>str1234</OriginCountryId>
                  <PrimarySupplierInd>str1234</PrimarySupplierInd>
                  <PrimaryCountryInd>str1234</PrimaryCountryInd>
                  <SuppPackSize>str1234</SuppPackSize>
                  <InnerPackSize>str1234</InnerPackSize>
                  <UnitCost>str1234</UnitCost>
                  <LastUpdateId>str1234</LastUpdateId>
                  <Dimensions>
                    <SuppCountryDim>
                      <DimType>str1234</DimType>
                      <DimObject>str1234</DimObject>
                      <Height>str1234</Height>
                      <Width>str1234</Width>
                      <Length>str1234</Length>
                      <LwhUOM>str1234</LwhUOM>
                      <Weight>str1234</Weight>
                      <NetWeight>str1234</NetWeight>
                      <WeightUOM>str1234</WeightUOM>
                      <LastUpdateId>str1234</LastUpdateId>
                    </SuppCountryDim>
                  </Dimensions>
                </SuppCountry>
              </Countries>
            </ItemSupplier>
          </Suppliers>
          <UDAs>
            <ItemUDA>
              <UdaId>str1234</UdaId>
              <UdaValue>str1234</UdaValue>
              <LastUpdateId>str1234</LastUpdateId>
            </ItemUDA>
          </UDAs>
          <Channels>
            <ItemChannel>
              <ChannelType>str1234</ChannelType>
            </ItemChannel>
          </Channels>
          <Attributes>
            <ItemAttributes>
              <ExtRefNo>str1234</ExtRefNo>
              <ParentExtRefNo>str1234</ParentExtRefNo>
              <Collection>str1234</Collection>
              <PerishableInd>str1234</PerishableInd>
              <PersAvailInd>str1234</PersAvailInd>
              <ShortDesc30>str1234</ShortDesc30>
              <ItemType>str1234</ItemType>
              <ConveyableType>str1234</ConveyableType>
              <GiftWrapType>str1234</GiftWrapType>
              <LastUpdateId>str1234</LastUpdateId>
            </ItemAttributes>
          </Attributes>
          <Ticket>
            <ItemTicket>
              <TicketTypeId>str1234</TicketTypeId>
              <LastUpdateId>str1234</LastUpdateId>
            </ItemTicket>
          </Ticket>
          <Carriers>
            <CarrierService>
              <CarrierSvc>str1234</CarrierSvc>
              <DefCarrierSvcInd>str1234</DefCarrierSvcInd>
            </CarrierService>
          </Carriers>
          <Shipping>
            <ShipRestrictions>
              <Carrier>str1234</Carrier>
              <AddressCode>str1234</AddressCode>
            </ShipRestrictions>
          </Shipping>
          <Pricing>
            <RetailPrice>
              <ZoneId>str1234</ZoneId>
              <UnitRetail>str1234</UnitRetail>
              <LastUpdateId>str1234</LastUpdateId>
            </RetailPrice>
          </Pricing>
          <PackItems>
            <PackItem>
              <CompExtRefNo>str1234</CompExtRefNo>
              <Qty>str1234</Qty>
              <LastUpdateId>str1234</LastUpdateId>
            </PackItem>
          </PackItems>
        </Item>
    The existNode is functioning with L_xml as the argument but not with L_itm_xml.
    Hope you have the clarity you were seeking out for.

  • Help With Simple Function

    I was wondering if someone could help me out with a simple function I'm trying to create. I'm kind of new to functions in oracle and I don't know the exact syntax or what it expects from me. I would appreciate it if someone could look at this and point out what I'm doing wrong.
    CREATE OR REPLACE FUNCTION freshman_status_term(
    pidm IN varchar2
    RETURN varchar2 IS term
    BEGIN
    SELECT sgbstdn_term_code_eff INTO term
    FROM sgbstdn
    WHERE sgbstdn_pidm = pidm
    AND sgbstdn_styp_code = 'F'
    AND sgbstdn_stst_code = 'AS'
    RETURN term;
    END freshman_status_term;
    The goal of the function is to find out the term for when a student is listed as a freshman. I keep getting errors though, so something must be wrong with it. Any help is appreciated. Thanks.

    Sven W. wrote:
    >
    My code looked exactly like that minus the exception part when I got the error before.Please post the code that you used and the full error message that you got.CREATE OR REPLACE FUNCTION freshman_status_term(
    pidm IN varchar2
    RETURN varchar2
    IS
    term sgbstdn.sgbstdn_term_code_eff%TYPE;
    BEGIN
    SELECT sgbstdn_term_code_eff INTO term
    FROM sgbstdn
    WHERE sgbstdn_pidm = pidm
    AND sgbstdn_styp_code = 'F'
    AND sgbstdn_stst_code = 'AS'
    RETURN term;
    END freshman_status_term;
    SELECT freshman_status_term ('216520') FROM dual;
    Error: PLS-00103: Encountered the symbol "SELECT" when expecting one of the following:
    ( - + ; case mod new not null <an identifier>
    The error is highlighted right after the BEGIN statement
    Edited by: user10548103 on Nov 6, 2008 8:53 AM

  • Help with @Prior function

    Hi,
    I have a requirement for member formula = (Forecast for CurMth - Actuals for CurMth) + (Forecast for PrevMth - Actuals for CurMth) / (Actuals for CurMth - Actuals for PrevMth)
    I am using the Prior function for this shown as below
    ( ( @PRIOR ("Monday Forecast",0,@CurrMbr("Periods")) - @PRIOR ("Actuals",0,@CurrMbr("Periods")) ) + ( @PRIOR ("Monday Forecast",1,@CurrMbr("Periods")) - @PRIOR ("Actuals",1,@CurrMbr("Periods")) ) ) / ( @PRIOR ("Actuals",0,@CurrMbr("Periods")) - @PRIOR ("Actuals",1,@CurrMbr("Periods")) ) ;
    I see that @ Prior function is not getting the values for the prev month scenario members. Any help would be appreciated guys.
    Thanks.

    Unless I have totally misunderstood your requirement, you are making this much more difficult than it needs to be!
    I would suggest the following steps...
    1. Read the Technical Reference entry for @PRIOR
    2. Get rid of all those @CURRMBR("Periods") specified as the range across which @PRIOR will operate (the third parameter). The range is an optional parameter which doesn't need to be specified if Periods is tagged as a Time dimension, and in any case, having a single member there is meaningless
    3. Don't use @PRIOR with zero specified as the offset - think carefully about what that means. You don't need @PRIOR at all to refer to anything in 'current month'
    Good luck!

  • Help with main function

    Can someone help me out with this? Im trying to create a main function out of this contructor.
    public studentID()
    int size; //hold returned values from box
    int id;
    int age;
    size = Integer.parseInt(JOptionPane.showInputDialog (" Enter a nummber between 1 & 40")); //dialog box
    recCount = 0;
    idArray = new int[size];
    ageArray = new int[size];
    for(int i = 0; i <size; i++) //ask for values (size) times
    id =
    Integer.parseInt(JOptionPane.showInputDialog ("Enter an ID Number"));
    age =
    Integer.parseInt(JOptionPane.showInputDialog ("Enter an age"));
    inputStudent(age, id); //calles method to put values in array
    displayAll();
    selectionSort(idArray, ageArray, size);
    newNumberTable();
    selectionSort(ageArray, idArray, size);
    newAgeTable();
    }

    So what's the problem? Dump it all into the main method.
    Actually I'd advise thinking carefully about whether it should really be in main(). Generally, IMHO, main should only bootstap an app. The real functionality should be in other methods that main() calls.

  • Help with select function

    Well guys, I have a problem here and I didn't find any solutions
    So maybe someone of you, can help me!
    My problem is:
    I have 2 numbers (100 and -200) and I have to plot the greater value.
    The problem is for me the signal of -(minus) doesn't means nothing....
    For the program I'm making, the -200 is greater than 100
    So I tryed put bouth as absolute value, but when I have the "answer" only appears the "200"
    and I need it appears -200
    So I thought about something like that:
    I use a select function and maybe do something like that:
    So I have to make something at True or False value at S to make this work!
    If true I receive 100, if is false I receive -200
    Thanks!

    I dont know why is in this section. I posted it on LabVIEW part!
    Well Dennis I make it like that:
    But now I have a problem
    I do the same calc for 3 differents variables like A, B, C
    and after that I have to calc which value is the "greater"
    But my problem is, If I have the values "-350 300 -400"
    the greater will be "300" but for me the "minus" don't mean anything
    so I need the greater value is "400"
    For all positive values, its works fine!
    I compare A and B, after that the greater is compared with C and have a result!
    but When I have negative values and positive values... I got that problem...
    and When I have only negative values I have a problem too. 
    "-300 -400 -500" for me the greater value have to be "-500" but labview shows "-300"
    because -300 is greater than -500 in algebriac.
    And If I use absolute values I will always have a positive value... but I need to know if the value is negative or positive
    Anyone, can help me with that?
    Thanks
    Message Edited by EduU on 10-29-2009 11:06 AM

Maybe you are looking for