MAX keep dense function

Hi Everyone,
Rod West explained to me about MAX keep dense here:
function:   row_number
I have another query to do that could use MAX, so tried this:
MAX(Status) KEEP(DENSE_RANK LAST ORDER BY ID||Status )
I want the max status for a student (where a student can have mutiple records with multiple status values)
I am getting an error:
ora 001722 - invalid number.
the status is an alpha field....
Did i code the max function correctly?
pls advise, thx, sandra

Hi,
This is not a problem with the MAX function, it is a conversion problem somewhere in the SQL that is sent the data or in an underlying database. When the database scans the table data there was some text that could not be converted into a number. If you have a condition comparing two types, e.g. number_column = text_column then Oracle will convert this condition to number_column = TO_NUMBER(text_column) and will attempt to convert all the text_columns when the table is scanned even if the rows are not need to resolve the query.
Without any more information about the query or the datatypes I cannot say how you might resolve this. There is more discussion in these threads:
Re: Invalid Number Error in Disco Plus - Urgent please!!
Re: ORA-01722:  invalid number.
Rod West

Similar Messages

  • How to keep multiple function modules under one Web service

    Hi Experts,
    I have Three RFC function modules and i need to create one web service for these three RFC function modules. I know How to crearte a web service for one function module.
    please suggest me How to keep multiple function modules under one Web service.
    Thanks in advance
    Lakshminarayana

    Hi Lakshmi,
    The best way to do it is to assign all the three RFC Enabled FM's to one function group. Later on the top menu in Utilities you get an option to Create a Webservice from a Function Group.
    You can create one single Webservice using all the the 3 FM's.
    I hope this helps.
    Thanks,
    Manu

  • MAX keeps crashing while trying to locate lecroy oscilloscope

    MAX keeps crashing on me while I try to find my oscilloscope over
    ethernet.  WINXP, LeCroy 454, LabView 7.1, NI VISA Server
    3.3.  I can connect to the scope with TightVNC.  If I select
    the scope in the MAX menu tree.  I get a very long hourglass, then
    crash of MAX.  MAX actually crashes a lot.  Is that common?
    thanks,
    Cullen
    LabView 6.2 for Linux running on Ubuntu (Debian) with 2.6 Kernel
    Labview 8.0 for Windows running on XP, IMAQ 3.6.0, NI-1428, NI-1430, NI Camera Link I/O Ext Board

    Cullen,
    Sounds like you might have two separate issues.  First if MAX crashes a lot, I would recommend that you try to repair the installation of the drivers you have installed on your computer, as well as MAX.  This can be done pretty easily by going to Add or Remove Programs then selecting National Instruments Software and clicking Change.  This should bring up another window where you can select the different programs to repair.  Hopefully once you have done this you will no longer have problems with MAX crashing. 
    After looking around a bit for more information about using the LeCroy 454, I found that it is recommended to install the IVI drivers for this instrument to communicate using TCP/IP.  These drivers use the LeCroy VISA to communicate, and may explain why you are unable to get MAX to recognize the driver and why it crashes.  I would recommend trying to install the IVI driver for this instrument and see if you can get it working after that.  The IVI drivers are maintained by LeCroy and can be found at the following website. 
    http://www.lecroy.com/tm/Library/Software/LabView/LabViewDrivers.asp?menuid=8
    Hope this information helps!
    Andy F.
    National Instruments

  • Password Keeper Find Function no longer works

    I just upgraded to a BlackBerry Curve and was very happy when my Password Keeper just showed up, accepted my old password and had my database. However, the find function no longer works. If I type A, is says no passwords found even though I can see a bunch as soon as I open it. So how does one fix and non-functioning password keeper find function. It is painful trying to get to the ones that start with "Z!"
    Solved!
    Go to Solution.

    Try a simple reboot on the device and check again.
    With the BlackBerry device powered ON, remove the battery a few seconds and then reinsert the battery to reboot.
    1. If any post helps you please click the below the post(s) that helped you.
    2. Please resolve your thread by marking the post "Solution?" which solved it for you!
    3. Install free BlackBerry Protect today for backups of contacts and data.
    4. Guide to Unlocking your BlackBerry & Unlock Codes
    Join our BBM Channels (Beta)
    BlackBerry Support Forums Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • Really need Min(a,b) and Max(a,b) function in "Eval formula node"

    Hi all,
    I've been using the 'Eval formula node" to let the user of my app configure his own calculations,
    but now I've found out that the "Eval formula node" doesn't support these functions.
    e.g        y= min (a,b)
    or         y = max (a+3, c-4)
    I considered adding them myself to the Eval formula node's subvi's,
    but franckly I've never seen such complex subvi's :-)
    Is pretty urgent. Any ideas?

    MegKB wrote:
    Maybe the MathScript node is the way to go now, as long as you want to install MatLab.
    The MathScript node does NOT need Matlab.  It runs Matlab-like code, but it is totally inside of LabVIEW.  There is a Matlab node that uses ActiveX to run Matlab.  For that you need to have Matlab installed.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Disable middle mouse button paste, but keep other functions

    Hello everybody,
    I am proud to own a Thinkpad USB-Keyboard with a TrackPoint, attachted to a UltraBase with a x201 on it. But this keyboard has a little problem. When I want to scroll with the middle button and the TrackPoint it first pastes the content of the Clipboard and for example in firefox another page is loaded if there was a link in the clipboard. This does not happen on the Keyboard of the laptop, but only on the USB-Keyboard. And because I don't use the paste-feature anyway I tried to remove it by remapping the mouse buttons in .Xmodmap like this:
    "pointer = 1 2 3 4 ~"
    to
    "pointer = 1 0 3 4 ~",
    but this only kept the scrolling function and disabled not only the pasting, but also the other functions like closing tabs.
    I would like to ask you how it is possible to disable the middle mouse-button-paste-feature but to keep all the other middle-mouse-button related functions, like closing tab, open hyperlinks in new tabs and of course scrolling with the TrackPoint.
    It would also be great if someone knows a solution for the misbehavior of the Thinkpad USB-Keyboard.
    Thank you very much

    shubb wrote:
    You are referring to the Trackpad, not mouse. 
    No I'm not.

  • SQL Max and Left functions

    In a table I have a field "Ticket No.". I am using Ticket No in a format like:
    00021-10-06-0201
    The first set (left side) represents Ticket No. Then month, year, and code.
    Each time when a user wants to enter new record a new ID is generated as:
    "Select max(Left(TicketID,5)) from Ticket".
    The new id becomes result+1.
    I want to know that the above field is a string. But when I use LEFT
    function, as above, it successfully returns max of the first set. Does
    it automatically converts it to Long integer?
    If not, how to use it securely so that first the left set is converted
    to Long Integer and then the MAX is found. All in SQL query.

    I want to know whether your "substr(00021...)
    approach and in my example, does max function
    automatically converts it to a numeric type.I did not use MAX in my example, but still it is converting to numeric depending on the operator you are using. Elaborating....see below..
    SQL> select substr('00021-10-06-0021',1,5)+1 from dual;
    SUBSTR('00021-10-06-0021',1,5)+1
                                  22
    SQL> select substr('A0021-10-06-0021',1,5)+1 from dual;
    select substr('A0021-10-06-0021',1,5)+1 from dual
    ERROR at line 1:
    ORA-01722: invalid number
    SQL> select substr('A0021-10-06-0021',1,5)||'A' from dual;
    SUBSTR
    A0021ASee the above 1st and 3rd query, the behaviour is completely based on the operators.

  • Keep package functions from starting automatically

    hey everyone! this should be simple.
    i've got a movie clip which i "exported for actionscript" inside of the properties dialog.
    this is the code inside of the package that was created to go along with it (MovieClipName.as)
    package
         import flash.display.MovieClip;
         import flash.utils.Timer;
         import flash.events.TimerEvent;
         import flash.events.Event;
         import flash.display.Loader;
         import fl.transitions.Tween;
         import fl.transitions.easing.*;
         import fl.transitions.TweenEvent;
         import flash.net.URLRequest;
         import flash.display.Bitmap;
         import flash.trace.Trace;
         public class cont extends MovieClip
              public var mCONTENT:Array=new Array();
              public var mUBTIL:Array=new Array();
              public var NOBAR:Boolean = false;
              public var MASTER:Timer = new Timer(5000,1);
              public var p:Number = 0;
              public var q:Number = 1;
              public var ChurnerI:Tween;
              public var ChurnerII:Tween;
              public var lod:Loader = new Loader();
              public function startSlideshow()
                   trace("CONT IS ACTIVE!!!")
                   NOBAR=false;
                   MASTER.addEventListener(TimerEvent.TIMER, reportProcessComplete);
                   MASTER.start();
                   loadSequentialPictures();
                   function beginSlideshowLoop()
                        if (NOBAR != true)
                             MASTER.start();
                             loadSequentialPictures();
                   function reportProcessComplete(e:Event)
                        p++;
                        if (p == 2)
                             p = 0;
                             movePics();
                   function reportMovementComplete()
                        wrapper();
                        beginSlideshowLoop();
                   function wrapper()
                        q++;
                        if (q == mCONTENT.length)
                             q = 0;
                   function loadSequentialPictures()
                        if (mCONTENT.length > 1)
                             if (mCONTENT[q] is Bitmap)
                                  mCONTENT[q].y = 0;
                                  mCONTENT[q].width = 857;
                                  mCONTENT[q].height = 512;
                                  mCONTENT[q].x = 857 + 2;
                                  stage.addChild(mCONTENT[q]);
                                  reportProcessComplete(null);
                             else
                                  loadSeqPic();
                   function loadSeqPic()
                        var request:URLRequest = new URLRequest("http://www.jawilsonarchitects.biz/portphot/" + mCONTENT[q]);
                        lod= new Loader();
                        lod.contentLoaderInfo.addEventListener(flash.events.Event.COMPLETE, seqLoaded);
                        lod.load(request);
                   function seqLoaded(e:Event)
                        var JohnIII:Bitmap = Bitmap(lod.content);
                        mCONTENT.splice(q,1,JohnIII);
                        mCONTENT[q].y = 0;
                        mCONTENT[q].width = 857;
                        mCONTENT[q].height = 512;
                        mCONTENT[q].x = 857 + 2;
                        stage.addChild(mCONTENT[q]);
                        reportProcessComplete(null);
                   function movePics()
                        ChurnerI = new Tween(stage.getChildAt(0),"x",Regular.easeInOut,stage.getChildAt(0).x,-857 - 2,15,false);
                        ChurnerII = new Tween(stage.getChildAt(1),"x",Regular.easeInOut,stage.getChildAt(1).x,0,15,false);
                        ChurnerII.addEventListener(TweenEvent.MOTION_FINISH, reset);
                   function reset(e:Event)
                        stage.removeChildAt(0);
                        reportMovementComplete();
    most of the code shouldn't matter. i'm new to packages and i just want to know how to keep startSlideshow() from triggering when a new instance of this movieclip is created. i would prefer if something like ThisMovieClip.startSlideshow() had to be triggered. please excuse my dorky labels, etc. thank you!
    EDIT: oh! and it would be helpful if you could tell me how to add things to the inside of the movieclip from this package. i assumed adding it to the stage would do the trick but i haven't been able to test to find the right method yet. from the timeline i could just use Movieclip.addChild(picture) but i don't know how to do it from within the package. thanks again.
    Message was edited by: JohnFour

    Nested functions are those functions inside another function.
    In your case, all functions are inside you main function.
    This is bad because you can't reach them from the outside of the wrap function (the function that have functions inside), and for another infinity set of things
    And about the initial problem, did you solved it putting the missing parenthesis?
    If you want your class being instantiated AND run right from the start, put a constructor function (a function with the same name of the class) on it.
    If not, just don't do this.
    (Confusing answer, I know!!)
    And to address your edit, can you specify a little?
    Do you want add images to this class or put the class on your stage?

  • Limit the CPU usage of applications to keep OS functional ?

    Hello,
    I would first like to say that I am not knowledgeable in programming or in computer science vocabulary. So I will say things as I think they are, sorry about that.
    My problem is:
    When using any applications, there is always a moment where the application will freeze the computer.
    In my understanding, it is because all the CPU is directed towards this application.
    So the simple solution that comes with this thinking is: if I limit the CPU an application can use, then I can keep my finder working even if the application crashes.
    I understand that I might totally be off-track and in that case, I would love to hear an explanation on how it really works.
    Thank you !

    Good stuff guys. I guess what I was not considering is that if any archived logs are overwritten, it makes recovery from the last full backup perilous. Here are some more facts about the DB that may help determining the best solution:
    All raster content is stored in a raster tablespace. We load raster content (Sat imagery, etc.) from disk or FTP delivery but we do not do any editing to it. So, once it is in Oracle it is static. So, a daily or re-occuring backup of the raster content may not make sense. It may make sense to only back up this tablespace once new loads occur. Also, the raster tablespace makes up over 95% of our DB size (~220GBs).
    All other content (mainly geospatial vector information) is stored in 2 other tablespaces and this is the content that is edited routinely and this is the content I need backed up often....and it is small...no more than a few gigs.
    So, what if I ran the DB in archive log mode, except for the raster tablespace, and did nightly backups on everything but the raster TS, and backed up the raster TS only when new content is loaded??? Does this seem like a good idea? and if so, what would be the best way to periodically backup a >200GBTS?
    This will make redo much MUCH smaller and I can handle removing the archived logs once a backup is complete.
    Thanks again. It is fun learning more about this stuff!!
    Thanks!
    Message was edited by:
    [email protected]

  • Max no of function keys in a screen . What do u mean by SSCR fields...

    give any simple understandable examples how to create function key...event driven programs...

    Hi,
    Try the following code n let me know if it works fine.
    Tables *
    tables:
    sflight, " Flight master
    sbook. " Single flight booking
    Field string to hold flight master data *
    data:
    begin of fs_sflight,
    carrid type sflight-carrid, " Carrier Id
    connid type sflight-connid, " Connection Id
    seatsmax type sflight-seatsmax, " Maximum seats
    seatsocc type sflight-seatsocc, " Occupied seats
    end of fs_sflight.
    Internal table to hold flight schedule data *
    data:
    t_sflight like
    standard table
    of fs_sflight.
    Field string to hold flight booking master data *
    data:
    begin of fs_sbook,
    carrid type sbook-carrid, " Carrier Id
    connid type sbook-connid, " Connection Id
    fldate type sbook-fldate, " Departure date
    bookid type sbook-bookid, " Booking number
    loccuram type sbook-loccuram, " Price of booking
    order_date type sbook-order_date, " Posting date
    end of fs_sbook.
    Internal table to hold single flight booking *
    data:
    t_sbook like standard table
    of fs_sbook.
    START-OF-SELECTION EVENT *
    start-of-selection.
    perform selection.
    END-OF-SELECTION EVENT *
    end-of-selection.
    loop at t_sflight into fs_sflight.
    write:/ fs_sflight-carrid,
    15 fs_sflight-connid,
    30 fs_sflight-seatsmax,
    45 fs_sflight-seatsocc.
    hide: fs_sflight-carrid.
    endloop. " LOOP AT T_SFLIGHT...
    at pf13.
    if sy-curow le 3.
    message 'invalid line selection'(001) type 'I'.
    else.
    perform select_data.
    perform display_data.
    endif.
    at pf14.
    if sy-curow le 3.
    message 'invalid line selection'(001) type 'I'.
    else.
    perform select_data.
    sort t_sbook by bookid.
    perform display_data.
    endif.
    at pf16.
    if sy-curow le 3.
    message 'invalid line selection'(001) type 'I'.
    else.
    perform select_data.
    sort t_sbook by loccuram.
    perform display_data.
    endif.
    FORM SELECTION *
    This subroutine retrieves necessary data from flight master table *
    There are no interface parameters to be passed to this subroutine. *
    form selection.
    select carrid " Carrier Id
    connid " Connection Id
    seatsmax " Maximum seats
    seatsocc " Seats occupied
    from sflight
    into table t_sflight.
    if sy-subrc ne 0.
    message 'No records found'(002) type 'S'.
    endif. " IF SY-SUBRC...
    endform. " SELECTION
    FORM SELECT_DATA *
    This subroutine retrieves necessary data from flight booking table *
    There are no interface parameters to be passed to this subroutine. *
    form select_data.
    select carrid " Carrier Id
    connid " Connection Id
    fldate " Flight date
    bookid " Booking number
    loccuram " Price of booking
    order_date " Booking Date
    from sbook
    into table t_sbook
    where carrid eq fs_sflight-carrid.
    if sy-subrc ne 0.
    message 'No records found'(002) type 'S'.
    endif. " IF SY-SUBRC...
    endform. " SELECT_DATA
    FORM DISPLAY_DATA *
    This subroutine displays data from flight booking table *
    There are no interface parameters to be passed to this subroutine. *
    form display_data.
    loop at t_sbook into fs_sbook.
    write: / fs_sbook-carrid,
    15 fs_sbook-connid,
    30 fs_sbook-fldate,
    45 fs_sbook-bookid,
    60 fs_sbook-loccuram currency sbook-loccurkey,
    75 fs_sbook-order_date.
    endloop. " LOOP AT T_SBOOK...
    endform. " DISPLAY_DATA
    Regards,
    Satish

  • Is it normal that MAX keeps losing my RDA device on client PC?

    I have an RDA server running giving my client PC (W2000) access to the PCI-6025E DAQ channels. The problem is that everytime the client PC shuts down or hibernates, the DAQ channels disappear and I have to manually go through the process of adding the device again. Also, for some reason, I get duplicate copies of the channels under Data Neighborhood, with one channel good and one marked with a red X. The server is running LabVIEW 7.1, and the client is running 6.1 (which I can't upgrade at the moment for various reasons).
    Is this the way MAX is supposed to work? Or is an added device supposed to be persistent? If devices are not persistent, is there a way to programmatically add the device?

    Hi Ricardo,
    When the remote computer starts up, often I can see the virtual channels all with red X's indicating that they are broken, and the PCI-6025E device is not in the device list. When I add it to the list, I get two of each virtual channel - one without the red X and one with the red X.
    I get no error messages.
    I read the knowledge base article "What Is Remote Device Access (RDA)?" Which says the following:
    Configuration is simple. On the computer with the DAQ device, run the RDA server. On the computer with LabVIEW, run the RDA Configuration Utility to assign device numbers to the remote DAQ devices. In LabVIEW, you do not need to change your DAQ applications at all; just use the device numbers that correspond to the remote systems.
    I didn't set up this way. I did the configuration using MAX on the computer with the DAQ. Then I discovered the ability to use RDA, so I ran RDA on the DAQ PC and went to the remote computer to run MAX. The first time I added the DAQ device everything looked good. I saved the configuration file on the remote computer. After that I started losing the device and getting the broken channels when the remote computer was shut down. I concluded from that that I was having a conflict between configurations and that maybe that was the cause of the channels with the red X's, so I stopped using the configuration file on the remote computer. I couldn't find a way to "undo" the configuration I had already created on the DAQ PC.
    Does this raise any red flags?
    Regards,
    Gizmogal

  • Why does itunes store not work anymore properly on first generation ipad? could we not expect that apple keeps apps functional on older devices?

    seems apple wants to push us throwing away 3 year old devices or forgets that it needs to maintain apps for them while moving on to new generation definetely frustrating that the app crashes all the time- so no more films or music downloading. also a reset did not help. Frustrating experience

    The Terms and Conditions of the iTunes Store clearly state all sales are final. The person you spoke with may have been told a refund could not be given. They may have contacted the developer of the app who is claiming that the in-app purchase was delivered to you.
    You would have been far better off to have called Apple back rather than switching to Chat. Contact them again, by phone, and ask to speak to a senior advisor and if necessary ask for a supervisor. If you threaten them and say they are cheating you, etc. they will probably disconnect so keep that in mind. They are under no obligation whatsoever to provide you a refund.

  • MAX function

    Hi Everyone,
    Am aware of the following flavors of MAX function
    1) choose MAX from the folders/fields list (selected items tab)
    2) create calculation using: MAX keep dense
    3) create calculation using: MAX analytic function
    questions, pls:
    ===========
    a) with MAX regular, MAX keep dense, MAX - analytic function
    is it necessary to sort it using tools/sort - choose fields to sort by?
    or does the data get sorted due to the ORDER BY clause in MAX used in a calculation
    b) how to understand the diff. bet. MAX keep dense and MAX - analytic function
    1) i understand that analytic functions are applied after detail row processing
    does MAX keep dense calculation happen during detail row processing?
    2) how did you know to advise when to use MAX keep dense, and when to use MAX - analytic function?
    tx for your ideas and assistance, sandra

    Hi,
    a) with MAX regular, MAX keep dense, MAX - analytic function is it necessary to sort it using tools/sort - choose fields to sort by? or does the data get sorted due to the ORDER BY clause in MAX used in a calculationIt is only necessary to use a sort if you want to have the rows returned in a specific order. The order by in the max calculation defines the maximum within the group or window. It may affect the order the rows are returned, but if it does this is not guaranteed and you should use a sort on the main query.
    b) how to understand the diff. bet. MAX keep dense and MAX - analytic function
    1) i understand that analytic functions are applied after detail row processing does MAX keep dense calculation happen during detail row processing?Yes
    2) how did you know to advise when to use MAX keep dense, and when to use MAX - analytic function?In general, if you want the result on a single row, so you have one row for each group then you should use the aggregate max. If you want to use the same max on all the rows in the window (defined by the partition) then use the analytic max.
    Rod West

  • What is keep() function

    Hi All,
    please let me know about keep(0 function what is use of its.
    Your suggestion would be greatly appreciated.

    KEEP is not a function, it's a clause within the FIRST() function.

  • Where do I find the SUM & MAX functions under update rule, TYPE: FORMULA

    Hi,
    If I am setting up an update routine
    TYPE: FORMULA
    where do I find the function SUM ?
    I need to take the sum of a particular key figure under certain condition with the statement:
    IF( <condition>, <result when true>, <result when false> )
    i.e.
    IF( field1 > field2, Sum of Field3, Sum of Field3 )
    I canu2019t seem to find the Sum function. I found +, -, / etc under Basic Functions. Even under all u201CAll functionsu201D, I only see u201Csummarizeu201D but not sum.
    --Also where do I find the MAX and MIN functions if I want to use them in FORMULAS?
    Thanks

    Hi......
    Its better you go for calculated keyfigure
    Check this link :
    http://help.sap.com/saphelp_nw04/helpdata/en/6f/56853c08c7aa11e10000000a11405a/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/EN/13/e072abaddb574284d22361f0b824bf/content.htm
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/72f4a790-0201-0010-5b89-a42a32223ffc
    It may help you......
    Regards,
    Debjani......
    Edited by: Debjani  Mukherjee on Sep 28, 2008 6:17 AM
    Edited by: Debjani  Mukherjee on Sep 28, 2008 6:23 AM

Maybe you are looking for