What does this do?

Greatest( Round( (nvl(a11.DISCH_THRU_DATE,sysdate) - a11.ADMIT_PRIMARY_DATE), 0), 0) ,
Hi can someone tell me what this does I found this in an existing report that I did not create and I am not familiar with this just a simple explaination as to the meaning. Here is what i think it does: Rounds the Disch_ Date to the highest number then subtracts the Admit_Date
but what is nvl and why the ,0),0) ? thanks

>
Hi can someone tell me what this does I found this in an existing report that I did not create and I am not familiar with this just a simple explaination as to the meaning. Here is what i think it does: Rounds the Disch_ Date to the highest number then subtracts the Admit_Date
but what is nvl and why the ,0),0) ? thanks
>
Close - try breaking it apart and put each element on a line by itself
Greatest(
     Round(
               nvl(a11.DISCH_THRU_DATE,sysdate) - a11.ADMIT_PRIMARY_DATE
          0),
     0
     ) ,And then work from the inside out - evaluate each piece and substitute the result
nvl(a11.DISCH_THRU_DATE,sysdate) - a11.ADMIT_PRIMARY_DATEThe NVL says: if DISCH_THRU_DATE is NULL then use SYSDATE.
Then ADMIT_PRIMARY_DATE is subtracted from that date (DISCH_THRU_DATE or SYSDATE if the first is NULL).
Let's use the name 'DIFF_DATE' for the value 'DISCH date minus ADMIT_PRIMARY_DATE'
Round(
               nvl(a11.DISCH_THRU_DATE,sysdate) - a11.ADMIT_PRIMARY_DATE
          0),The above code now becomes
Round(DIFF_DATE, 0),So that Rounds the data difference to 0 places. A data difference is in days so this rounds to the nearest whole day.
Lets call that value 'WHOLE_DAYS'
Now this code
Greatest(
     Round(
               nvl(a11.DISCH_THRU_DATE,sysdate) - a11.ADMIT_PRIMARY_DATE
          0),
     0
     ) ,becomes this code
Greatest(WHOLE_DAYS, 0),So your orginal expression is calculating the number of whole days between DISCH_THRU_DATE (or sysdate if that date is NULL) and ADMIT_PRIMARY_DATE.
The 'Greatest' says to use zero if the WHOLE_DAYS is negative.

Similar Messages

  • What does this mean:Photoshop 13.1.2 for Creative Cloud Installation failed. Error Code: U44M1P7

    What does this mean:Photoshop 13.1.2 for Creative Cloud Installation failed. Error Code: U44M1P7
    I found the manual update, which worked!
    http://www.adobe.com/support/downloads/thankyou.jsp?ftpID=5595&fileID= 5604

    Hi Barbara,
    For failed 13.1.2 update error U44M1P7, Please refer to the solution mentioned in the following threads :
    http://forums.adobe.com/message/5396792#5396792
    http://forums.adobe.com/message/5409050#5409050

  • Why has my monitor suddenly begun to have a moiré pattern all over – it is even showing up on my icons on the dock? It appears to be very thin bright green vertical lines. I have a 2008 iMac which is running 10.6.8. What does this mean?

    Why has my monitor suddenly begun to have a moiré pattern all over – it is even showing up on my icons on the dock? It appears to be very thin bright green vertical lines. I have a 2007 iMac which is running 10.6.8. What does this mean? I've attached some screen shots below.
    Also experiencing some funky issues with my wireless keyboard. With new batteries, it will just stop functioning. Certain keys intermittently won't work. Also the fans go on as soon as I turn the computer on - some times they stay on and sometimes they don't. Ever since upgrading the operating system - I've been having many issues with this iMac. Not happy. Any answers out there?

    Thanks for your reply LexSchellings, There is no disc in the drive and I went through the suggestions you put forward on the phone with Apple support without any luck. I can put a disc in but it pops straight back out again without registering on finder.
    The idea of using an external drive was to enable me to avoid the cost and loss of productivity whilst machine in repair... if I have to take it in to get the old drive removed than I might as well have a new internal drive put in, although I do worry about the reliability of these apple drives given my experience with this one coupled with my limited online research ... on line forums seem to be full of people with the same problem (although perhaps searching such forums is bound to make it seem a common problem as users with perfectly working machines are less likely to post (?)) Your reply suggests that no external drive will work whilst the existing drive is in place.
    As a postscript: I do realise that this is a user forum ...my secondary question was asking if anyone knows how to put forward a case/complaint to Apple... I can't find a link on the support page that would enable me to do so and I was wondering if anyone on this user forum had any ideas/experience..

  • When trying to update my IPad apps I am getting the message "Your Apple ID has been disabled". Still have more than 50$ in my account, so what does this mean ?  What can I do to get my ID enabled again ?

    when I am trying to download IPad updates I get the message "Your Apple ID has been disabled". What does this mean? How do I get my ID enabled again? Still got more than 50$ in my account !

    Reset your Apple ID password here >  Apple - My Apple ID
    More information here >  Apple ID: "This Apple ID has been disabled for security reasons"  appears

  • I'm trying to upgrade to Mountain Lion and I get an error message that says "server error during download; 403 forbidden. What does this mean, what can I do? I had no problem downloading Lion.

    Trying to upgrad to Mountail Lion and got an error message : 403 Forbidden. What does this mean? What can I do? I had no problem when I upgraded to Lion.

    403 Forbidden HTTP status code in response to a request from a client for a web page or resource to indicate that the server refuses to allow the requested action. In other words, the server can be reached, but the server declined to allow the requested access.
    http://en.wikipedia.org/wiki/HTTP_403
    Could you be using a different Apple ID oe such?

  • I am suddenly unable to open my pictures in Adobe Photoshop. It gives the following message: The document "Tina-19.jpg" could not be opened. Photoshop cannot open files in the  "Adobe Photoshop JPEG file" format. What does this mean? I have opened my phot

    I am suddenly unable to open my pictures in Adobe Photoshop. It gives the following message: The document “Tina-19.jpg” could not be opened. Photoshop cannot open files in the  “Adobe Photoshop JPEG file” format.
      What does this mean? I have opened my photos in Adobe Photoshop for years and suddenly I get this message and can't open any of my pictures

    JoeLib wrote:
    You type way faster than me Gene.
    Well, not necessarily in this case.
    According to the time stamp, Gene posted his answer a bit over three hours before you did, Joe.
    Gene's post:       Dec 29, 2014 5:54 PM
    Joe's post:          Dec 29, 2014 8:57 PM

  • What does this message mean:  this apple ID has not yet been used in the iTunes store"? I cant connect using my iphone. But it works in iTunes on my laptop.

    what does this message mean:  this apple ID has not yet been used in the iTunes store"? I cant connect using my iphone. But it works in iTunes on my laptop.

    FAQ apple id http://support.apple.com/kb/HT5622?viewlocale=en_US
    http://support.apple.com/kb/HT1311

  • What does this message mean?  "ITunes has fetected an iPad in recovery mode.  You must restore this iPad before it can be used with ITunes".

    What does this message mean?  "itunes has detected an iPad in recovery mode.  You must restore this iPad before it can be used with ITnes."  How do I restore when every time I connect to my computer I get this message?

    Perhaps the information in this Apple support article will help:
    http://support.apple.com/kb/TS3694#error3004
    Regards.

  • What does this message mean Charging is not supported with this device?

    What does this message mean Charging is not supported with this device?

    You've gotten 2 good answers already, but there's a key assumption in both that you got the message when connecting the iPhone to some other device. If this is the case you can get an adapter in the Apple online store that will allow charging from older devices.
    If, however, this message appears when you are not connected to anything the problem is dirt or moisture in the dock connector at the bottom of the phone. Clean it with a dry toothbrush or air blast.

  • What does this message mean when i dial

    What does this verizon message mean?
    'your call cannot be completed as dialed'
    i got a number on my caller id from my ex's neighborhood
    609-424-xxxx
    its not his (old, home) number, but i am concerned that he got a new number or maybe called from a pay phone--
    he has a history of psychological abuse
    i tried calling the number back from a pay phone from the next county to see if i could find out thatit wasn't him to put my mind at ease..
    but i got the above message
    i dialed the number that was on my caller ID
    would this message come up if it were a payphone that does not take incoming calls?
    why else would i get the message.
    thats the number that came into my caller id, but i am told it can't be completed as dialed..
    i was calling from the 732 area code and did use the full number with the area code
    i tried googling the number and doing a reverse look up
    we live far apart--i don't know anyone else in his town--its too much of a coincidence to just be a wrong number
    there is not enough to file a police report yet

    This seems to suggest that it could be filenames… (see the final posts).
    https://discussions.apple.com/message/7818914?messageID=7818914#7818914?messageI D=7818914
    Replace dashes, underscores, hyphens & any other funky looking characters. Very long filenames of folder paths may cause trouble too.

  • What does this message mean? : "The file name "DSC_0088.jpg" is offline or missing." ?

    What does this message mean? : "The file name "DSC_0088.jpg" is offline or missing."   I am in the process of importing photos from iPhoto (don't really know what I'm doing....) and when I look at one of the imported photos that message pops up.  I know what "DSC_0088.jpg" is.  I don't know what it means that the file is "missing".

    CASpyr,
    Thank you so much for your reply.  I have a couple of bigger issues that I am dealing with: too many photos on my laptop: 40,000! (Of course I have to throw away many of them, but that is time consuming). I have a MacBook Pro and have primarily used IPhoto. I have recently purchased 2 external drives and have transferred my photos to those, but I need a basic education about how photos are stored, copied, etc.  I have recently been told that iPhoto only shows and deals with jpegs, not RAW.  About 1/3 of my photos are RAW, so I purchased Lightroom, so I could do more with those RAW photos.  I have been told by my local Mac store that I need to delete most of my photos from iPhoto, because it's causing problems.  I am reluctant to do so until I am sure that all of the keywords, descriptions and editing I have done to these photos is not lost when deleted from iPhoto. I just watched a tutorial about importing to Lightroom and got out of it that I needed to copy photos from iPhoto to a file on my desktop and then copy to Lightroom.  I did that, it seemed to work.  Then (because of my storage/memory issues) I deleted the photos (just a few as an experiment) from that desktop file.  I'm guessing that is why Lightroom doesn't recognize the the photos.  It seems that (learned from another tutorial) that one uses "Add" , Lightroom is only connecting to the source of the photo, not  actually copying it to the program.  Sounds like I need to use the "Move" feature instead.  My ultimate goal is to store the photos on the 2 external drives and eliminate most of them from my lapop.  So my basic questions have to do with what data (metadata??) is copied from iPhoto to an external drive (RAW???) and what isn't copied. Basic understanding issues,obviously….  I hope this isn't too much to ask.  If you can recommend a book or resource that can explain those basic issues to me I'd appreciate it.  I just got back from a trip and I can't download my new photos until I manage the rest!
    Thanks,
    Nancy

  • What does this message mean - The operation can't be completed because the item "12b" is in use.

    The operation can’t be completed because the item “12b” is in use.  What does this message mean.  It appeared as I was attempting to clear my time machine backup?

    Reboot your machine make sure Aperture doesn't start (as Lion is liable to do) and try it.

  • What does this message mean baring in mind we don't know who 'Lareib' is?: ''Lareibs phone' is now using (my number) for iMessage'

    What does this message mean baring in mind we don't know who 'Lareib' is?: ''Lareibs phone' is now using (my number) for iMessage'

    How would we users in this forum also know who Lareib is?
    It means what is stated, that person is now using your number for imessage.

  • What does this message mean? "Warning: SUID file "System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/MacOS/ARDAg ent" has been modified and will not be repaired"

    What does this message mean? "Warning: SUID file "System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/MacOS/ARDAg ent" has been modified and will not be repaired"  I get this when I try to repair permissions in disk utility.

    It's an innocuous error you can ignore. It was introduced with previous updates for ARD and/or Java before Lion. These are messages, not errors. They will cause no harm, and they will be repeated each time you repair permissions.

  • What does this message mean: "power pc applications are no longer supported"?

    What does this message mean: you can not start because power pc applications are no longer supported?

    Here is a post that I assembled for another who needed to continue to run his PowerPC applications in Lion/Mt. Lion:
    Unfortunately you got caught up in the minor miracle of Rosetta.  Originally licensed by Apple when it migrated from the PowerPC CPU platform that it had used from the mid-1990's until the Intel CPU platform in 2006, Rosetta allowed Mac users to continue to use their library of PPC software transparently in emulation.
    However, Apple's license to continue to use this technology expired with new releases of OS X commencing with Lion (and now Mountain Lion).  While educational efforts have been made over the last 6 years, the fact is that Rosetta was SO successful that many users were caught unaware UNTIL they upgraded to Lion or Mountain Lion.
    Workarounds:
    1. If your Mac will support it, restore OS X Snow Leopard;
    2.  If your Mac will support it, partition your hard drive or add an external hard drive and install Snow Leopard into it and use the "dual-boot" method to choose between your PowerPC software or Lion/Mt. Lion;
    3.  Upgrade your software to Intel compatible versions, or find alternative software that will open your data files;
    3.  Install Snow Leopard (with Rosetta) into Parallels:
                                  [click on image to enlarge]
    Full Snow Leopard installation instructions here:
    http://forums.macrumors.com/showthread.php?t=1365439
    NOTE: STEP ONE of the instructions must currently be completed on a Snow Leopard or Lion Mac and the resulting modified Snow Leopard.cdr install file can then be moved over to your Mountain Lion Mac for completion of the remaining steps.
    NOTE 2:  Computer games with complex, 3D or fast motion graphics make not work well or at all in virtualization.

  • Sending an email from my Ipad I get "receipient was rejected by server because it does not allow relaying". What does this mean and how do I correct it?

    When sending an email from my Ipad. I get "receipient was rejected by server because it does not allow relaying". What does this mean and how do I correct it?

    On the email account's settings (Settings > Mail, Contacts, Calendars and tapping on the account on the right), go into it's outgoing SMTP settings and try putting in your email name and password (they might currently show as 'optional')

Maybe you are looking for