Function to obtain latest salary

Hi
Can anyone point out a function or API that can fetch latest salary of an employee?
Regards
- Saira

Hi,
Depending on here the salary elements are configured, looking at salary proposal is fine if your salaries are all ad hoc salary basis.......however if the structure is grade rates / spinal salaries etc this might not work.
Not sure what legislation you're running on but in the UK you could always use the rates histroy functionality if the elements are configured to use it.
Regards
Glen

Similar Messages

  • How to Make Flash CS4/Dreamweaver CS4 Website Function on all Latest Mobile Devices

    Hello!
    I am trying to add code into my Dreamweaver CS4 file and/or Flash CS4 file in order to have the website I have created work across all of the latest mobile devices as well as traditional online systems. My flash file has a transparent stage, and my dreamweaver file has a full-screen background image. I have reviewed various tutorials and articles available online, and some advocate simply adding code, which does not seem to be working for me, while others suggest having a similar separate site created solely for mobile devices. If this is the best option, I don't know how that should be set up. What is the best path to take with this?
    This is the collection of various pieces of code I have tried adding to my files:
      <meta name="viewport" content="width=device-width" user-scalable="yes" initial-scale="1.0" /> <!-- iphone,android -->
       <meta name="HandheldFriendly" content="true" /> <!-- blackberry -->
    </style>
       <param name="allowScriptAccess" value="sameDomain" />
          <param name="allowFullScreen" value="true" />
    <param name="allowScriptAccess" value="sameDomain" />
            <param name="allowFullScreen" value="true" />
            <param name="var params = {          id: "flashID", name: "flashcontent", menu: "false", allowFullScreen: "true", fullScreenOnSelection: "true", scale:"noscale", salign:"middle"};"
    stage.scaleMode = StageScaleMode.NO_SCALE;
    stage.align = StageAlign.TOP_LEFT;
    //or//
    this.stage.scaleMode = StageScaleMode.NO_SCALE;
    this.stage.align = StageAlign.TOP_LEFT;
    next_btn.width = 133 * .5;
    next_btn.height = 133 * .5;
    //flash//
    next_btn.width = Capabilities.screenDPI * .5;
    next_btn.height = Capabilities.screenDPI * .5;
    //flash//
    this.stage.addEventListener(Event.RESIZE, doLayout);
    //flash://
    <initialWindow>
       <width>320</width>
       <height>480</height>
       <!-- several other properties... -->
    </initialWindow>
    * Convert inches to pixels.
    private function inchesToPixels(inches:Number):uint
       return Math.round(Capabilities.screenDPI * inches);
    var button:Sprite = new Sprite();
    button.x = 20;
    button.y = 20;
    button.graphics.beginFill(0x 003037);
    button.graphics.drawRect(0, 0, this.inchesToPixels(.75),
       this.inchesToPixels(.25));
    button.graphics.endFill();
       this.addChild(button);
    //hard-code title://
    var titleBar:Sprite = new Sprite();
    titleBar.x = 0;
    titleBar.y = 0;
    //stage width determines width of title://
    var titleBar:Sprite = new Sprite();
    titleBar.x = 0;
    titleBar.y = 0;
    titleBar.graphics.beginFill(0x003037);
    titleBar.graphics.drawRect(0, 0, this.stage.stageWidth,
       this.inchesToPixels(.3));
    titleBar.graphics.endFill();
    this.addChild(titleBar);
    //footer://
    var footer:Sprite = new Sprite();
    footer.graphics.beginFill(0x003037);
    footer.graphics.drawRect(0, 0, this.stage.stageWidth,
       this.inchesToPixels(.3));
    footer.graphics.endFill();
    footer.x = 0;
    footer.y = this.stage.stageHeight - footer.height;
    this.addChild(footer);
    * Center one DisplayObject relative to another.
    private function center(foreground:DisplayObject,
       background:DisplayObject):void
          foreground.x = (background.width / 2) -
             (foreground.width / 2);
          foreground.y = (background.height / 2) +
             (foreground.height / 2);
    //cont.//
    var title:SimpleLabel = new SimpleLabel("My Application",
       "bold", 0xffffff, "_sans", this.inchesToPixels(.15));
    this.center(title, titleBar);
    this.addChild(title);
    //override width and height getters
    public override function get width():Number
       return this.textLine.textWidth;
    public override function get height():Number
       return (this.textLine.ascent - 1);
    if (Capabilities.manufacturer == "Android Linux" && Capabilities.screenResolutionY == 1024)
    next_btn.width = 85;
    next_btn.height = 85;
    This is the code for my Dreamweaver CS4 file (without the additional erogenous code attempts!):
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <?xml version="1.0" encoding="utf-8"?><!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.2//EN"
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>My Website Title and Slogan.</title>
    <style type="text/css">
    <!--
    body {
              background-image: url(bground%20_img3.jpg);
              background-repeat: no-repeat;
    -->
    <script src="Scripts/swfobject_modified.js" type="text/javascript"></script>
    </head>
    <body>
    <img src ="image.gif"  width=90% height=auto>
    <script src="Scripts/swfobject_modified.js" type="text/javascript"></script>
    <meta name="Keywords" content="keywords…" />
    <div align="center"></div>
    <div align="center">
      <p> </p>
      <p>
        <object id="FlashID" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="900" height="630">
          <param name="movie" value="FlashFile.swf" />
          <param name="quality" value="high" />
          <param name="wmode" value="transparent" />
          <param name="swfversion" value="6.0.65.0" />
          <!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. -->
          <param name="expressinstall" value="Scripts/expressInstall.swf" />
          <!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->
          <!--[if !IE]>-->
          <object type="application/x-shockwave-flash" data="FlashFile.swf" width="900" height="630">
            <!--<![endif]-->
            <param name="quality" value="high" />
            <param name="wmode" value="transparent" />
            <param name="swfversion" value="6.0.65.0" />
            <param name="expressinstall" value="Scripts/expressInstall.swf" />
            <!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
            <div>
              <h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
              <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /></a></p>
            </div>
            <!--[if !IE]>-->
          </object>
          <!--<![endif]-->
        </object>
      </p>
    </div>
    <div align="center"> </div>
    <script type="text/javascript">
    <!--
    swfobject.registerObject("FlashID");
    swfobject.registerObject("FlashID");
    //-->
    </script>
    </body>
    </html>
    I have tried various combinations of the code listed above, but nothing seems to be working. I am not sure as to the correct positioning of the code, and maybe that is the problem, or maybe it is because this code in not for CS4, or not appropriate for my project. I also do not know what code should be inside the Flash file, nor what should should be inside the Dreamweaver file.
    Thank you in advance for any assistance!

    There is no simple code to add that will display the same on all mobile devices....
    you do know that the iProducts (iPhone, iPad, etc) don't display Flash at all, right?
    So as a start for "functioning on all latest mobile devices" you should drop any Flash content you have and move on.
    Adninjastrator

  • Could not obtain latest contract from popen(3C): No such process

    when i add a scripts in crontab file.in /var/cron/log shows the error
    could not obtain latest contract from popen(3C): No such process

    I HAVE THE CONFIGURATION OF SOLARIS 10
    THE WHOLE CONFIGURATION IS SunOS 5.10 Generic sun4u sparc SUNW,Sun-Fire-V210
    ERROR:Re: could not obtain latest contract from popen(3C): No such process
    THIS PROBLEM SOLVE WITH YOUR SUGGESTED PATCH

  • How to Make Dreamweaver CS4/Flash CS4 Website Function on all Latest Mobile Devices

    Hello!
    I am trying to add code into my Dreamweaver CS4 file and/or Flash CS4 file in order to have the website I have created work across all of the latest mobile devices as well as traditional online systems. My flash file has a transparent stage, and my dreamweaver file has a full-screen background image. I have reviewed various tutorials and articles available online, and some advocate simply adding code, which does not seem to be working for me, while others suggest having a similar separate site created solely for mobile devices. If this is the best option, I don't know how that should be set up. What is the best path to take with this?
    This is the collection of various pieces of code I have tried adding to my files:
      <meta name="viewport" content="width=device-width" user-scalable="yes" initial-scale="1.0" /> <!-- iphone,android -->
       <meta name="HandheldFriendly" content="true" /> <!-- blackberry -->
    </style>
       <param name="allowScriptAccess" value="sameDomain" />
          <param name="allowFullScreen" value="true" />
    <param name="allowScriptAccess" value="sameDomain" />
            <param name="allowFullScreen" value="true" />
            <param name="var params = {          id: "flashID", name: "flashcontent", menu: "false", allowFullScreen: "true", fullScreenOnSelection: "true", scale:"noscale", salign:"middle"};"
    stage.scaleMode = StageScaleMode.NO_SCALE;
    stage.align = StageAlign.TOP_LEFT;
    //or//
    this.stage.scaleMode = StageScaleMode.NO_SCALE;
    this.stage.align = StageAlign.TOP_LEFT;
    next_btn.width = 133 * .5;
    next_btn.height = 133 * .5;
    //flash//
    next_btn.width = Capabilities.screenDPI * .5;
    next_btn.height = Capabilities.screenDPI * .5;
    //flash//
    this.stage.addEventListener(Event.RESIZE, doLayout);
    //flash://
    <initialWindow>
       <width>320</width>
       <height>480</height>
       <!-- several other properties... -->
    </initialWindow>
    * Convert inches to pixels.
    private function inchesToPixels(inches:Number):uint
       return Math.round(Capabilities.screenDPI * inches);
    var button:Sprite = new Sprite();
    button.x = 20;
    button.y = 20;
    button.graphics.beginFill(0x 003037);
    button.graphics.drawRect(0, 0, this.inchesToPixels(.75),
       this.inchesToPixels(.25));
    button.graphics.endFill();
       this.addChild(button);
    //hard-code title://
    var titleBar:Sprite = new Sprite();
    titleBar.x = 0;
    titleBar.y = 0;
    //stage width determines width of title://
    var titleBar:Sprite = new Sprite();
    titleBar.x = 0;
    titleBar.y = 0;
    titleBar.graphics.beginFill(0x003037);
    titleBar.graphics.drawRect(0, 0, this.stage.stageWidth,
       this.inchesToPixels(.3));
    titleBar.graphics.endFill();
    this.addChild(titleBar);
    //footer://
    var footer:Sprite = new Sprite();
    footer.graphics.beginFill(0x003037);
    footer.graphics.drawRect(0, 0, this.stage.stageWidth,
       this.inchesToPixels(.3));
    footer.graphics.endFill();
    footer.x = 0;
    footer.y = this.stage.stageHeight - footer.height;
    this.addChild(footer);
    * Center one DisplayObject relative to another.
    private function center(foreground:DisplayObject,
       background:DisplayObject):void
          foreground.x = (background.width / 2) -
             (foreground.width / 2);
          foreground.y = (background.height / 2) +
             (foreground.height / 2);
    //cont.//
    var title:SimpleLabel = new SimpleLabel("My Application",
       "bold", 0xffffff, "_sans", this.inchesToPixels(.15));
    this.center(title, titleBar);
    this.addChild(title);
    //override width and height getters
    public override function get width():Number
       return this.textLine.textWidth;
    public override function get height():Number
       return (this.textLine.ascent - 1);
    if (Capabilities.manufacturer == "Android Linux" && Capabilities.screenResolutionY == 1024)
    next_btn.width = 85;
    next_btn.height = 85;
    This is the code for my Dreamweaver CS4 file (without the additional erogenous code attempts):
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <?xml version="1.0" encoding="utf-8"?><!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.2//EN"
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>My Website Title and Slogan.</title>
    <style type="text/css">
    <!--
    body {
              background-image: url(bground%20_img3.jpg);
              background-repeat: no-repeat;
    -->
    <script src="Scripts/swfobject_modified.js" type="text/javascript"></script>
    </head>
    <body>
    <img src ="image.gif"  width=90% height=auto>
    <script src="Scripts/swfobject_modified.js" type="text/javascript"></script>
    <meta name="Keywords" content="keywords…" />
    <div align="center"></div>
    <div align="center">
      <p> </p>
      <p>
        <object id="FlashID" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="900" height="630">
          <param name="movie" value="FlashFile.swf" />
          <param name="quality" value="high" />
          <param name="wmode" value="transparent" />
          <param name="swfversion" value="6.0.65.0" />
          <!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. -->
          <param name="expressinstall" value="Scripts/expressInstall.swf" />
          <!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->
          <!--[if !IE]>-->
          <object type="application/x-shockwave-flash" data="FlashFile.swf" width="900" height="630">
            <!--<![endif]-->
            <param name="quality" value="high" />
            <param name="wmode" value="transparent" />
            <param name="swfversion" value="6.0.65.0" />
            <param name="expressinstall" value="Scripts/expressInstall.swf" />
            <!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
            <div>
              <h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
              <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /></a></p>
            </div>
            <!--[if !IE]>-->
          </object>
          <!--<![endif]-->
        </object>
      </p>
    </div>
    <div align="center"> </div>
    <script type="text/javascript">
    <!--
    swfobject.registerObject("FlashID");
    swfobject.registerObject("FlashID");
    //-->
    </script>
    </body>
    </html>
    I have tried various combinations of the code listed above, but nothing seems to be working. I am not sure as to the positioning of the code, and maybe that is the problem, or maybe it is because this code in not for CS4, or not appropriate for my project. I also do not know what code should be inside the Flash file, nor what should should be inside the Dreamweaver file.
    Thank you in advance for any assistance!

    Hi
    To add to what Gramps has said, Adobe has ceased developing its flash player for ALL mobile devices so do not use Flash for any mobile device.
    Depending on the complexity of your Flash program you may be able to recreate it using Edge, but the code generated by Edge does not work in IE8 or below.
    For details on Edge, see - http://labs.adobe.com/technologies/edge/
    PZ

  • Get previous and latest salary from IT0008 Record

    Hey guys, i am trying to develop a letter that needs to show an increment, i.e. grab the current and previous records from IT0008..
    I have tried a few things:
          CALL FUNCTION 'HR_READ_INFOTYPE'
    >> this does not get the salary i need.. but gives me dates that i used in:
          CALL FUNCTION 'RP_FILL_WAGE_TYPE_TABLE'
    >> this is returning the current salary and future salarys (we have some postdated increments in the system) but does not get me the previous no matter what i put in for dates.
    also tried:
          CALL FUNCTION 'RP_FILL_WAGE_TYPE_TABLE_EXT'
    >> same as above.
    thoughts? i want to get the last two records as they appear in Pa20/30 for IT0008.
    Thanks!
    -Jason

    Jason:
    My suggestion
    SELECT * FROM PA0008 WHERE  INTO it_0008
       PERNR EQ P_PERNR.
    SORT it_0008 BY ENDDA DESCENDING.
    READ TABLE it_0008 INDEX 1.
    MOVE it_0008 TO WA_LAST.
    READ TABLE it_0008 INDEX 2
    MOVE it_0008 to WA_PREV.
    Obvious,  wa_last and wa_prev there are work area LIKE PA0008.
    I think this can work fine.
    Regards.
    José Luis

  • Function to find Average salary

    Hello everyone,
    First of all I would like to say that I am a newbie to PL/SQL so please be patient with me. I am trying to create a function that will calculate the average salary for employees and compare the average salary to each employee's salary. If the employee's salary is lower than the average salary, my function will return true, elese it will return false.
    I think I have a great start but need some guidance on what to do next. Here's my function so far:
    CREATE OR REPLACE FUNCTION check_employee_salary
    (p_empno IN NUMBER)
    RETURN NUMBER
    IS
    lv_sal emp.sal%TYPE;
    BEGIN
    SELECT avg(sal)
    INTO lv_sal
    FROM emp
    WHERE empno = p_empno;
    RETURN (lv_sal);
    END;
    My function compiles but I can't figure out how to compare the avg(sal) to sal so that I can return true and false. Any guidance will be appreciated as I really want to understand PL/SQL and am trying very hard.
    Thanks

    Your function currently returns the average salary for a single employee, and since (in scott.emp at least) an employee only has one salary, it will return that.
    SQL> select empno, ename, job, sal, check_employee_salary(empno) from emp;
         EMPNO ENAME      JOB              SAL CHECK_EMPLOYEE_SALARY(EMPNO)
          7369 SMITH      CLERK            800                          800
          7499 ALLEN      SALESMAN        1600                         1600
          7521 WARD       SALESMAN        1250                         1250
          7566 JONES      MANAGER         2975                         2975
          7654 MARTIN     SALESMAN        1250                         1250
          7698 BLAKE      MANAGER         2850                         2850
          7782 CLARK      MANAGER         2450                         2450
          7788 SCOTT      ANALYST         3000                         3000
          7839 KING       PRESIDENT       5000                         5000
          7844 TURNER     SALESMAN        1500                         1500
          7876 ADAMS      CLERK           1100                         1100
          7900 JAMES      CLERK            950                          950
          7902 FORD       ANALYST         3000                         3000
          7934 MILLER     CLERK           1300                         1300
    14 rows selected.To report whether a specified employee's salary was above or below average, it would have to find the overall average (select avg(sal) from emp) and compare that to the specified employee's salary (select sal from emp where empno = p_empno). This would however be about the most inefficient way imaginable to derive this rather odd statistic. The easy way is using straight SQL:
    select empno, ename, job, sal
         , avg(sal) over() as company_avg_sal
         , case when sal < avg(sal) over() then 'Below'
                when sal = avg(sal) over() then 'Average'
                when sal > avg(sal) over() then 'Above'
           end as comparison
    from   emp;
         EMPNO ENAME      JOB              SAL COMPANY_AVG_SAL COMPARISON
          7369 SMITH      CLERK            800      2073.21429 Below
          7499 ALLEN      SALESMAN        1600      2073.21429 Below
          7521 WARD       SALESMAN        1250      2073.21429 Below
          7566 JONES      MANAGER         2975      2073.21429 Above
          7654 MARTIN     SALESMAN        1250      2073.21429 Below
          7698 BLAKE      MANAGER         2850      2073.21429 Above
          7782 CLARK      MANAGER         2450      2073.21429 Above
          7788 SCOTT      ANALYST         3000      2073.21429 Above
          7839 KING       PRESIDENT       5000      2073.21429 Above
          7844 TURNER     SALESMAN        1500      2073.21429 Below
          7876 ADAMS      CLERK           1100      2073.21429 Below
          7900 JAMES      CLERK            950      2073.21429 Below
          7902 FORD       ANALYST         3000      2073.21429 Above
          7934 MILLER     CLERK           1300      2073.21429 Below
    14 rows selected.

  • IPhone timer functionality lost with latest update

    The latest iPhone update has seemingly eliminated the ability to set the timer for anything other than full minutes. I utilized the "seconds" feature very frequently, and this change is an annoyance. Sadly, thoughtless changes by Apple seem to be becoming SOP. I don't suppose anyone knows of a "fix" for this, do they? (I'm still very frustrated over the change to FaceTime on my laptop which mutes all other sounds, limiting the program's functionality; this seems to be a developing pattern.)

    Why this function disappeared for awhile, I don't know, but the seconds option is now back. I don't get it...

  • What happen to the MP4 to MP 3 function in the latest upgrade?

    I cant find the function that allowed you to change from MP4 to MP3 in the latest upgrade.
    Anyone know where it went?

    i wil buy the power supply after tomorrow   what is the best????
    do u think that problem only in the power ???
    thanks for help
    my msn messenger :  [email protected]
    can we talk if u please?

  • Function to obtain organization.

    Hello experts,
    We are using SRM 5.0, and have a question on how to obtain the following:
    In transaction BBP_PD, I find a Purchase Order with Object type = BUS2201 and ObjectID = PO number.
    In the results, I see a section that says "Organizations", with information at the header level.
    Is there a function that brings me those results? If so which one is it?
    From what I found, the system makes a direct call to table BBP_PDORG, but it makes the search by GUID, but I don't know where it's obtaining it from...
    Thanks!
    Regards,
    Gilberto Gallardo

    Hello,
    See thread below: it could answer to your request.
    Link: [Name of person in Purchasing group;
    You can use the first function modul to get all purchasing data.
    Then, get the purchasing organization and purchasing group for each item and look for them in export parameter from FM BBP_OM_DETERMINE_RESP_PGRP
    Regards.
    Laurent.

  • Howto:  SQL query to obtain latest n rows

    Hey everyone,
    I want to query a subset of a table to return, at most, a certain number of rows. The problem is that 'rowcnt' is not going to be good enough. Here's the situation:
    I have a table with lots of data (15 days worth). It will accumulate over time, but I want to extract, say, only the last 10 rows that were placed into the table. That would be simple, but there is one other catch, there is a key column and I may want to select rows from each "key". So a simple row count won't work :(.
    Here's a sample table:
    key         varchar(10)
    val1        varchar(5)
    val2        varchar(5)
    epoch_time  number(30)Now, this would ALMOST work:
    select key, val1, val2, epoch_time from t where key='KEYVAL1' and rowcnt <= 10 order by epoch_time desc;
    Because the decending sort on epoch_time guarentees that the latest 10 rows will be returned. The problem arises when I want this:
    select key, val1, val2, epoch_time from t where key IN ('KEYVAL1', 'KEYVAL2') and rowcnt <= 10 order by epoch_time desc;
    I intend to get 10 rows (or less) returned for each 'KEYVAL1' and 'KEYVAL2', but since rowcnt is a global count of rows returned this obviously won't work as desired.
    Keep in mind that I could have 5 rows, 10 rows, 1000 rows for a key...so I could be selecting three keys, one with 5 rows, the next with 40 and the next with 7. Therefore, if I did something like assume I'll get back 30 rows (10 per key) this situtation would render that solution invalid because I'd get 5 from the first and 25 from the second and none from the 3rd.
    So, the actual question is, can I make some modification to the above query such that I can get the last 10 rows from both 'KEYVAL1' and 'KEYVAL2'. Possibly changing the order by clause to order by both key and epoch_time and then somehow switching the rowcnt to a value that would be capable of returning itself to 0 upon encountering a new key value?? I think I could do this with PL/SQL, but I'd have to use a static value to hold the row count and last passed key value, and that wouldn't work if more than one query executed at once unless there were some kind of "query specific data" (analogous to thread specific data) that I could utilize.
    If not, I guess I'll have to write a PL/SQL routine to simulate the entire query because I can't use unions (at least I don't think I can) because I have to be capable of using an IN list to determine the key values I desire.
    If anyone has a suggestion, I'd really appreciate it. THANKS!
    Brian Gregg
    Computer Sciences Corp.

    Are you running with 8.1.6 Enterprise Edition or higher? If so, you can solve your problem with Analytic functions, specifically RANK() or DENSE_RANK().
    SELECT * FROM
    ( SELECT key, val1, val2, epoch_time,
           DENSE_RANK() OVER (PARTITION BY key ORDER BY epoch_time DESC) AS ep_rank
    FROM   t
    WHERE  key IN ('KEYVAL1', 'KEYVAL2')
    ) WHERE ep_rank <= 10;Caveat: this code is typed without benefit of database so you may need to check the syntax.
    Cheers, APC

  • How to repair the sleep function with the latest version 10.8?

    After installing 10.8 I have a problem with the "sleep" function. When I use this by hand my iMac shut down and have to restart.
    This problem doesen't appear when I use the automatic one (in my case shut the iMac down after 15 minutes) and can I use the my iMac without any problem after touching the spacebar.

    http://support.apple.com/kb/HT3964?viewlocale=en_US

  • Obtain info from nested table in function?

    Oracle9i 9.2.0.1.0/Windows 2000
    I'd like to obtain an ID from a nested table object in order to insert it into an ID field (outside the nested table I'm getting it from). I've got a function that lets me get a foreign key ID from one other table ('objtarget'); but it isn't nested:
    CREATE FUNCTION oeln.get_obj_id(
         obj_type IN oeln.objtarget.objecttarget%type
    RETURN oeln.objtarget.obj_id%type
    IS id_type oeln.objtarget.obj_id%type;
    BEGIN
    SELECT obj_id INTO id_type
    FROM oeln.objtarget
    WHERE oeln.objtarget.objecttarget = obj_type;
    RETURN(id_type);
    END;
    SELECT obj_id
    FROM oeln.objtarget
    WHERE obj_id = get_obj_id('');
    I'm getting compilation errors on functions to obtain ID's from nested tables instead. I've got the table 'opt' (includes the fields 'opt_id' & 'optics'). The 'optics' field in opt is of type o_tab(o_ty), including the field 'optinfo'. I'd like to get the opt_id out of the opt table, from input I obtain for the optinfo field: i.e.,
    SELECT opt_id
    FROM oeln.opt
    WHERE opt_id = get_opt_id('');
    In other words, I'd like to get opt_id from the opt table like I get obj_id from the objtarget table; but instead of looking it up by objecttarget I've got to look it up by optinfo, a field in a nested table object in the opt table itself. I've only gotten compilation errors on functions in order to do this. Is this an option?
    - Noel

    select * from table(v_names);
    I guess ,here you were trying to put the content of the NT into another NT, or just trying to print it.
    But, I don't think INTO Clause is mandatory here.
    Please check your modified code (w/o INTO) and the output :
    DECLARE
       TYPE string_table IS TABLE OF VARCHAR (100);
       v_names   string_table := string_table ();
       v_test    string_table := string_table ();
    BEGIN
       v_names.EXTEND (3);
       v_names (1) := 'name1';
       v_names (2) := 'name2';
       v_names (3) := 'name3';
       DBMS_OUTPUT.put_line ('Old collection - '||v_names (1));
       DBMS_OUTPUT.put_line ('Old collection - '||v_names (2));
       DBMS_OUTPUT.put_line ('Old collection - '||v_names (3));
       DBMS_OUTPUT.put_line ('Old collection - '||v_names.COUNT ());
       DBMS_OUTPUT.put_line (CHR(10));
       /* SELECT * FROM TABLE (v_names); */
       v_test := v_names;
       DBMS_OUTPUT.put_line ('New collection -- '||v_test (1));
       DBMS_OUTPUT.put_line ('New collection -- '||v_test (2));
       DBMS_OUTPUT.put_line ('New collection -- '||v_test (3));
       DBMS_OUTPUT.put_line ('New collection -- '||v_test.COUNT ());
       DBMS_OUTPUT.put_line (CHR(10));
       /* Printing using FOR LOOP */
       FOR i IN v_test.FIRST..v_test.LAST
       LOOP
         DBMS_OUTPUT.put_line ('In FOR Loop --- '||v_test (i));
       END LOOP;
    EXCEPTION
       WHEN OTHERS
       THEN
          DBMS_OUTPUT.put_line ('Error ' ||SQLERRM|| DBMS_UTILITY.format_error_backtrace);
    END;gives o/p :
    Old collection - name1
    Old collection - name2
    Old collection - name3
    Old collection - 3
    New collection -- name1
    New collection -- name2
    New collection -- name3
    New collection -- 3
    In FOR Loop --- name1
    In FOR Loop --- name2
    In FOR Loop --- name3Refer this link -- http://docs.oracle.com/cd/E11882_01/appdev.112/e17126/tuning.htm#CIHGGBGF
    Edited by: ranit B on Dec 26, 2012 2:29 PM
    -- code modified
    Edited by: ranit B on Dec 26, 2012 2:45 PM
    -- code 'again' updated -- FOR LOOP added

  • Is there any function that returns the latest DDL statement

    can anyone tell me if there is any FUNCTION that returns latest DDL statement performed in a schema.
    OR
    if there is any TABLE that will be populated with latest
    DDL statement in schema.
    THANK YOU.

    The table all_objects (and/or dba_objects) contains a column called last_ddl_time. Thus, a query like
    scott@jcave > SELECT max(last_ddl_time)
      2  FROM all_objects
      3 WHERE owner = 'SCOTT';
    MAX(LAST_DDL_TI
    28-NOV-03will tell you the last time any object owned by SCOTT had DDL issued against it.
    Justin
    Distributed Database Consulting, Inc.
    www.ddbcinc.com/askDDBC

  • How to get the latest row from my Logical Table Source?

    Hi everyone,
    I have a SALARY_HISTORY table that holds the Salary Date and the Salary Amount for an employee, as a simple example. In my Business Model, I want to have a Display Folder called "Current Salary" and use the Where Clause restriction to derive the latest salary for each of my employees.
    In standard SQL Plus, I used a nested SQL statement, e.g. "where a.SalaryDate = (select max(b.SalaryDate) from SALARY_HISTORY b where b.employeeid = a.employeeid)".
    Is there anyway in the "Where Clause" filter of the LTS to derive this type of a query?
    I have tried things like "DB".""."SCHEMA"."AL_SALARY_HISTORY"."SalaryDate" = EVALUATE('SELECT_PHYSICAL MAX(SALARY_DATE) FROM "DB".."SCHEMA"."AL_SALARY_HISTORY" WHERE employeeid = %1)', "DB".""."SCHEMA"."AL_SALARY_HISTORY"."employeeid"). And I know I can't use any of the analytic functions in a where clause.
    So how do I go about this other than creating a View in the database or creating a function in the database to give me the maximum salary date for my employee?
    Thanks
    Paul

    Hi Paul,
    You could achieve this requirement using a sub query. Briefly, the steps are
    1. Just create one report with max(salary_date) for each employee.
    2. Create another report with SALARY_DATE included.
    3. Create a filter (Based on another analysis) on this report, as employee is in(Employee of report in step1) AND SALARY_DATE IS IN(SALARY_DATE of report in step1)(this is the max_salary_date for him)
    You could notice that BI Server would send two queries to the backend for this info.
    Hope this helps.
    Thank you,
    Dhar

  • Why does Discoverer put my custom function into GROUP BY

    To make things clear with simple example:
    I have 10 id's from people (people.id) and sum function on their salary [sum(people.salary)] during a period of time that i set in my parameters.
    The sql looks something like this:
    SELECT PEOPLE.ID
    ,SUM(PEOPLE.SALARY)
    FROM FRS_PEOPLE
    WHERE [MY CONDITIONS]
    GROUP BY PEOPLE.ID
    I registered a function that uses people.id, and some other parameters to calculate something for each people.id!
    I made a calculation:
    MY_FUNCTION(people.id,'xxx','yyy')
    ,so my sql looks like this now:
    SELECT PEOPLE.ID
    ,SUM(PEOPLE.SALARY)
    ,MY_FUNCTION(people.id,':xxx',':yyy')
    FROM FRS_PEOPLE
    WHERE [MY CONDITIONS]
    GROUP BY PEOPLE.ID,MY_FUNCTION(people.id,':xxx',':yyy')
    It runs but never finishes....?!
    When i run my sql in sqlplus i do not put my function into group by, but discoverer does so, despite it already has people.id item in GROUP BY!
    And if i put instead of people.id an actual id it works correctly and does not put my function into group by!
    The sql i am looking for and works correctly is:
    SELECT PEOPLE.ID
    ,SUM(PEOPLE.SALARY)
    ,MY_FUNCTION(people.id,'xxx','yyy')
    FROM FRS_PEOPLE
    WHERE [MY CONDITIONS]
    GROUP BY PEOPLE.ID
    Please someone help!
    My select clause is much more complicated, with many outer joins so i made the above up just to explain to you what my problem is!
    I hope i made my self clear!
    Help would be very appreciated.

    Hi,
    I think there is a problem with your function. That fact that the report completes when an actual id is used must not when a people.id is used suggests that it works when the function is called once with an actual id but not when it is called many times with a people.id.
    If the function is doing complex lookups and calculations to obtain a salary for each people.id then often this type of report will run quicker with the salary calculation is brought into the report SQL using joins etc.
    Tracing the Discoverer session running the report will show you all the SQL processed by the database and the execution plans used. It will show you how often the function is being called and what SQL is being run by the function.
    Rod West

Maybe you are looking for

  • Itunes won't open after install of IOS7

    After installing IOS7 on my Iphone4S iTunes won't open.  When you click the app it starts to open and then just closes.  I have shut the phone off and checked the settings but nothing seems to be working.  Help?

  • Using presentation variable in multiselect control

    Hi All, I have a requirement. I'm showing a dashboard page which contains a Direct SQL request and a prompt. The prompt needs to be a multiselect control. The SQL request is as follows: Select user_name, user_id from table_name where user_id = @{pres

  • Administration Panel Error and a Question about Static IPs

    Since there appears to be no other place to report errors within the latest generation of Linksys router firmwares, I thought the forums may be the best place. If you use remote access to your router's Administration management console, upon saving a

  • [10.5][CS3] Printing margens problem

    Hi, Does anynone have a solution for this problem: When exporting a document to pdf, using correct settings, a correct PDF document is generated. When printing the document, using the same correct settings like pagesize and bleedmargens etc, the file

  • Macbook wine fixed?

    Just curious do any owners of the newer macbook week 26+ not have any issues with the dreded cpu wine? I heard something recently about apple changing the logic board they use as to get rid of the wine problem. I think that might have been mbp's thou