Help with expression for business days

Dear Frends,
I need help with business days expression.
The report is for call center operation. Whenever a user calls in and opens an issue it is recorded as a case. And each case is associated with create time and valueofone(which is always one).
My report contains 'case type' as the first column, and rest of the columns are age buckets(col1: 0-5 days, col2: 6-10 days). By saying agebuckets I mean number of days between create date and current date. All the cases that are less than 5 days older will go to first column and similarly all the cases that are 6-10 days old will go to the second column and so on.
In a normal case I use the following case statement: case when daysbetween(current_date, create_date) between x1 and x2 then count(valueofone) else null end
But I need to calculate only the business days as age, so I need an expression look something like this: case when (_days_between(current_date, create_date)-no of holidays) between x1 and x2 then count(valueofone) else null end
Note: My calendar table has a column 'Business Day' which assigns 'Y' to Business day and 'N' to holiday.
Any help with this expression or any suitable way.
Regards
Chilla

If you have a calendar table, wouldn't your function be just
CREATE FUNCTION business_days_between( p_day1 IN DATE, p_day2 IN DATE )
  RETURN NUMBER
IS
  l_cnt NUMBER;
BEGIN
  SELECT COUNT(*)
    INTO l_cnt
    FROM calendar_table ct
   WHERE ct.business_day = 'Y'
     AND ct.<<date column>> >= trunc(p_day1)
     AND ct.<<date column>> < trunc(p_day2);
  RETURN l_cnt;
END;Basially, count the number of rows in your calendar table that are business days between the two dates.
Justin

Similar Messages

  • Need Help with Skype for Business!

    I purchased the Skype for business for an entire year. Now, I cannot for the life of me figure out how to log in. Do I have to link it to original skype? I am new to this and have no knowledge of the formats of Skype or it for business.
    Subject/title expanded to reflect post content a little more accurately.

    Hi, and no need to feel stupid!
    Welcome to this on-line community.
    A few questions for you to clarify the Skype product you are working with, so we can send you in the right direction in an effort to resolve the problem:
    Are you referring to either Skype Manager, or Skype Connect?  Do you recall what "business" product you have? 
    Or, what are you trying to sign in to?  A Skype account via the Skype website, or the software itself?
    This FAQ article should help unravel the mysteries of the differences between a personal Skype account and a Skype For Business (formerly known as Lync) configuration: https://support.skype.com/en/faq/FA34551/what-s-the-difference-between-skype-and-skype-for-business
    Thanks in advance for providing the additional details.
    Regards,
    Elaine
    Was your question answered? Please click on the Accept as a Solution link so everyone can quickly find what works! Like a post or want to say, "Thank You" - ?? Click on the Kudos button!
    Trustworthy information: Brian Krebs: 3 Basic Rules for Online Safety and Consumer Reports: Guide to Internet Security Online Safety Tip: Change your passwords often!

  • Help! Windows Explorer crashes regularly when using "SharePoint" directory synced with OneDrive for Business

    We are using SharePoint 2013 and I want to sync document libraries with
    OneDrive for Business with my PC running Windows 7.
    In general, it works, but my Windows Explorer crashes very often (after a few minutes) when I navigate in the synced directories and open files there (or copy files into them in Windows Explorer).
    How can I find out what happens and how to avoid it?
    remark:
    We are still using Office 2007, so I installed only OneDrive for Business from the Office 2013 DVD and
    deactivated all other components like Office 2013 by hand:
    (so for example, the shared office feature or MS Info Path etc. were not installed)
    Is there a crash log, where I can find more information about the crash?
    Does OneDrive maybe need other components to be installed and can I install them without damaging my existing Office 2007 setup?

    Did  you check your Event Viewer for any errors during the time when Windows Explorer crashed?
    Thanks for this hint!
    The Log file says the following, so it seems to be WIDCOMM\Bluetooth Software\btncopy.dll
    to be responsible for the crashing Windows Explorer
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
      <System>
        <Provider Name="Application Error" />
        <EventID Qualifiers="0">1000</EventID>
        <Level>2</Level>
        <Task>100</Task>
        <Keywords>0x80000000000000</Keywords>
        <TimeCreated SystemTime="2014-06-27T15:06:31.000000000Z" />
        <EventRecordID>50873</EventRecordID>
        <Channel>Application</Channel>
        <Computer>COMPUTERNAME</Computer>
        <Security />
      </System>
      <EventData>
        <Data>explorer.exe</Data>
        <Data>6.1.7601.17567</Data>
        <Data>4d672ee4</Data>
        <Data>btncopy.dll</Data>
        <Data>6.3.0.9000</Data>
        <Data>4f85fbda</Data>
        <Data>40000015</Data>
        <Data>000000000002e25e</Data>
        <Data>18bc</Data>
        <Data>01cf9215ab79ee98</Data>
        <Data>C:\Windows\explorer.exe</Data>
        <Data>C:\Program Files\WIDCOMM\Bluetooth Software\btncopy.dll</Data>
        <Data>9e5a534a-fe0c-11e3-90e5-fee5c7d69b69</Data>
      </EventData>
    </Event>

  • Office OneNote 2013 working with OneDrive for Business

    M$ is going to be the death of me.
    So here's what I have Windows 8.1 Pro with Office 2013 Pro with OneDrive for Business with our own SharePoint 2013 environment running on a tablet. 
    I open this lovely OneNote Product and all it asks me is to sign into my M$ Account, I don't want to use my M$ account I want it to just open and allow me to create a new notebook...  It just asks me to sign into my M$ account.  I don't want to
    do that.
    So I got into my SharePoint document library,click New document, create onenote document, open it and OneNote prompts me to log into my M$ account.... 
    I don't want to use my M$ account, I want to use my OneDrive For Business and the SharePoint 2013 environment we've paid thousands of dollars for...
    Another funny thing I found is, OneNote 2013 for Mac, works with OneDrive for Business?!?!  On Windows?  NOPE!
    Am I missing something simple?

    Hi,
    I'm marking the reply as answer as there has been no update for a couple of days.
    If you come back to find it doesn't work for you, please reply to us and unmark the answer.
    Best Regards,
    Steve Fan
    Forum Support
    Come back and mark the replies as answers if they help and unmark them if they provide no help.
    If you have any feedback on our support, please click
    here

  • Users are unable to synchronize document libraries with OneDrive for Business

    Hello,
    We are having an issue with our users attempting to synchronize document libraries with OneDrive for Business. When a user tried to synchronize the document library either via the "SYNC" button on the document library page using IE or by
    manually entering the document libraries path into the OneDrive for Business desktop app they receive the following error
    "We can't connect to the specified SharePoint site". The users have the Edit permission to both the site and the document library. I have performed the following actions in attempt to get the synchronization to work.
    1. Tested giving user the owner permission to the site and document library. same result.
    2. Performed a repair on the users Office 2013 installation.
    An interesting point to note is that I myself am able to synchronize the document libraries using both the "SYNC" button on the document library site and by entering the path manually in the desktop app. Difference between my account and the test
    accounts is that I'm a site collection administrator and farm administrator. Can anyone shed some light onto this issue?

    Hi Corey,
    According to your description, my understanding is that the users cannot sync document libraries with OneDrive for Business.
    I recommend to check the Permission Level to see if the Use Client Integration Features permission is selected.
    If not, check this permission in the corresponding permission level which is granted to the users.
    Please also check if the users have the right permission to sync the document library with OneDrive for Business.
    More reference:
    http://nheylen.wordpress.com/2014/05/15/sync-error-we-cant-connect-to-the-specified-sharepoint-site/
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

  • Help with updates for CS6

    I need help installing latest updates for CS6.  I have Win 7 and have tried updating from the Help - Updates menu.  The error is:  U43M1D207.

    Thanks for your response.  I am in the United States in So. Arizona.
    Date: Fri, 5 Oct 2012 12:21:45 -0600
    From: [email protected]
    To: [email protected]
    Subject: Help with updates for CS6
    Re: Help with updates for CS6 created by Jeff A Wright in Downloading, Installing, Setting Up - View the full discussion
    Crunkle1 you are welcome to work directly with our support team for guided assistance.  If you go to http://www.adobe.com/ and select Help and Contact Us you should be given the option to contact our support team via telephone.  Which country/region are you in?
    Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at http://forums.adobe.com/message/4752605#4752605
    Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/4752605#4752605
    To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/4752605#4752605. In the Actions box on the right, click the Stop Email Notifications link.
    Start a new discussion in Downloading, Installing, Setting Up by email or at Adobe Community
    For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • Need Help With Download For Airport Express

    Ok, computer dummy here needing help with airport express. We were given airport express last night from a friend who recently purchased a newer gadget. He told us we would need to come here to download the operating system. I see lots of links to updates but no links for someone like me who has never had anything like this on my computer before. Does anyone know what link I would need to use? We have a pc with windows XP. Thanks so much for your help!

    Hello jesschambers. Welcome to the Apple Discussions!
    The AirPort Express Base Station (AX) doesn't have an "operating system" per se, but it does have built-in firmware which pretty much is the same thing. In addition, in order to administer the AX, you will need the AirPort Admin Utility for your Windows PC.
    Here are the links for the latest versions of both:
    o AirPort Express Firmware Update 6.3 for Windows
    o AirPort 4.2 for Windows

  • Help with website for free 30 day trial

    I am out of town for a technology conference and have paid for a workshop on Photoshop.  I just received an email from the teacher that I must bring a laptop with Photoshop CS6 installed.  I was sent the following link....
    https://creative.adobe.com/plans    I should be able to click on the free download for 30 days trial; but the link does not work.
    Watson Chapel School District has purchased liscense for this product.  I just have not had this installed on my computer yet.  I am the technology coordinator for the district and really need to learn how to use this product. 
    I am happy to use the free 30 day trial until I get back to get the real deal product installed; but the link does not work.
    If you wish, you can take over my computer and help me !!!
    Thanks.

    What system? What browser? Have you simply tried another browser?
    Mylenium

  • Help with foumula for showing labor needed each day

    Post Author: bob wagner
    CA Forum: General
    Trying to find labor for each day the job runs. I only see it for start date now. The fields I have are, Work Order start date / Work order end date / labor factor for work order (people needed on job) How do I get the labor to show for each day that the work order is running? Using xi

    Post Author: sharonmtowler
    CA Forum: General
    each day, is that the time between start or end,
    or do you consider start date as the work day- if this is so, create a group on the start day for each day it will group all work for that day

  • Help with description of Business Area!

    Hi everyone!
    I really need help with a field, 'cause I can't find in which database table is saved, the filed that I'm using is BSEG-GSBER and it throws me a number of a business area, but I also need the name of the business area and that's the field that I can't find.
    If anyone can help me to find that field, I'll really appreciate it.
    Have a good day and thanks for your time!

    Hi,
    Take a look at TGSBT table, this is the text table for TGSB which is the master table for Business areas.
    TGSBT has got the names that you are looking for in all the languages that have been maintained.
    MANDT
    SPRAS
    GSBER
    GTEXT
    Regards,
    Ravi
    Note : Please close thread, it this solves the issue

  • HOW DO YOU GUYS DEAL WITH APPLE.. SO CONFUSING...NEED HELP WITH SPECS FOR PURCHASE OF IMAC 21.5

    Hi guys, been reading your forums, blogposts, etc and am getting more confused.  I'm just a video girl trying to produce meaningful content through web videos for small to mid sized businesses and want to come over from the dark side. 
    Good news,, I dont need a super giant system,  I do simple editing for web videos, minimal graphics, no motion graphics, no animation etc. currently using CS4, will probably end up with 5.5.
    I want to get imac 21.5 or 27 if i have to..  So here's the question we all have,,, what do I really need besides an Apple fairy godmother to figure this crazy stuff out?????
    I want to be able to have firewire add on, but the rest is what I need help with.   So i've been looking at cs6 specs, even though im not there yet, eventually will be,, so just need to run cs4 now and build from there.  I also want to eventually move to final cut down the road so I want imac able to upgrade to final cut.
    WHAT DO I REALLY NEED MINIMALLY FOR NOW?  WHAT CAN I GET LATER IF i CHOOSE TO DO MORE AND NEED MORE POWER?
    cs6:
    Multicore Intel processor with 64-bit support
    Mac OS X v10.6.8, v10.7, or v10.8**
    4GB of RAM (8GB recommended)
    4GB of available hard-disk space for installation; additional free space required during installation (cannot install on a volume that uses a case-sensitive file system or on removable flash storage devices)
    Additional disk space required for preview files and other working files (10GB recommended)
    1280x900 display
    7200 RPM hard drive (multiple fast disk drives, preferably RAID 0 configured, recommended)
    OpenGL 2.0–capable system
    DVD-ROM drive compatible with dual-layer DVDs (SuperDrive for burning DVDs; Blu-ray burner for creating Blu-ray Disc media)
    QuickTime 7.6.6 software required for QuickTime features
    Optional: Adobe-certified GPU card for GPU-accelerated performance
    Any responses would be great.  I know you guys are busy answering the really high end tech questions

    All the current iMac models (both 21.5" and 27" with OS X Mt. Lion 10.8) will run CS4, 5.5 and 6 just fine.  They will also run Final Cut Pro X just fine.  Ditto for most any application you may want to use.
    Below are some notes (specific to your apparent requirements) that may help you with your purchase decision:
    Notes on purchasing a 21.5" iMac
    All 21.5" iMacs come with 8GB RAM but you cannot add more later.  I strongly suggest getting the maximum RAM (16GB) when you order the iMac.
    The basic hard drive is a 1TB 5400rpm drive.  It will work fine with Adobe CS but you will probably want the added speed of the optional 1TB Fusion drive for better performance. Some people will recommend/argue for one of the optional SSD drives instead, but they are very expensive and still only come in relatively small capacities - I don't recommend the SSD drives.  Get the Fusion drive and spend any extra money on a good external hard drive for backup and/or extra storage instead of an SSD.
    Notes on purchasing a 27" iMac
    All 27" iMacs come with 8GB RAM and you can add more later, up to 32GB
    The basic hard drive is a 1TB 7200rpm drive - it will be fine with Adobe CS.  There are upgrade options to a 3TB 7200rpm drive or a 1TB or 3TB fusion drive - these will be fine also.  There are also SSD drive options, but I do not recommend them. (Same comments as above.)
    Notes on all the current iMacs
    iMacs no longer come with built-in CD/DVD drives.  If you need one, you will need to purchase the Apple Superdrive accessory drive ($79)
    All of the iMac graphic processors (GPU's) are compatible with Adobe CS 4, 5.5, 6
    It is very difficult to impossible to change or upgrade the hard drive later on, so don't buy low-end thinking you can add a better internal hard drive later.
    Be aware that Macs always come with the latest (most recent) version of OS X.  And OS X Mavericks (10.9) is due to be released soon (in the next month or two).  There is no guarantee that the older Adobe CS 4 or 5.5 versions will run on OS X Mavericks.  If you cannot upgrade to CS 6 in the near future, you may want to purchase now rather than after OS X Mavericks is released.
    For what it's worth, I'd recommend the 27" iMac if your budget can afford it.  You will appreciate the larger screen size and added capabilities over the years you will use the computer.

  • RE case number 185479759 which was closed today (thought problem was fixed but still persists). LR keeps crashing and no one seems to be able to figure out why. Am getting really frustrated here as I have been dealing with this with Adobe for several days

    Come on now, how many times do I have to type the above question. I need help getting my LR5 to work. It keeps crashing. Have been working with Adobe for this problem for several days now and still no resolution.

    You're not talking to Adobe here - this is a user-to-user forum.
    If you want help here, you'll need to explain exactly what the problem is, and include details like your OS, your camera, what you're doing when the crash happens, etc.
    FAQ: What information should I provide when posting, or What do you need to know to solve my issue?

  • I need help with itunes for windows 7.

    wondering if any one can help? i am running windows 7 and i recently had trouble with itunes it used to open and work, when i recieved my new iphone itunes decided not to open any more i tried un-install and re-install and it didnt work i reset my laptop back to its factory settings and re-installed itunes it worked for that day then went wrong again. i have tried doing apple software update and it comes up with error and some numbers followed by cc. if i try and re-install itunes it says invalid right to use bonjour.
    any help? thanks

    I have absolutely no idea who Ari is
    It appears you do not know how to use this forum
    To reply back to Ari, you should have done that on the same thread so that he can see it
    Yes, you can call Apple if you are willing to pay for it
    Allan

  • Need help with expression builder issue

    Hi all
    I'm hoping someone can help with an issue I'm having. I'm creating a database for a manufacturing joinery. For 1 of my forms, Ive to create a despatch form which includes order details along with customer details. Some customers can have contracts in which
    they get a fixed price on certain item. This is where the problem lies.
    For my customers table, I have a field called "On contract" which is a Yes/No field. I've created a query to attempt to make this form. I'm having trouble with adding a total column at the end of this query. Quantity,Unit Price, Contract Price
    are also in the query. I've been trying to build an expression to say like;
    iif [on contract] = "Yes", [Quantity] * [Contract Price]
    iif [on contract] = "no", [Quantity] * [Unit Price]
    It obviously wont work, what am I doing wrong?
    Thanks in advance

    Hi,
    Assuming you are using the database is SQL Server:
    SELECT [CustomerID]
    ,[Quantity]
    ,[Unit Price]
    ,[Contract Price]
    ,[Total] = CASE WHEN [On Contract] = 'Yes' THEN [Quantity] * [Contract Price]
    WHEN [On Contract] = 'No' THEN [Quantity] * [Unit Price] END
    FROM [Customers]
    Modify the SQL to suit your need.
    Hope this helps.
    ~J.

  • SharePoint with OneDrive for Business

    Hi, I'm looking for some clarification on how OneDrive works with SharePoint. The person who set up SharePoint is no longer with the company and we do not have expertise on this subject.
    We have three SharePoint 2013 servers - a database server, a web server, and a Web Apps server.
    OneDrive for Business integration works fine. However, I am now trying to upload some 20+ GB at a time but keep getting the error "there is not enough space on SharePoint. You need an additional x GB to copy these files".
    I've checked all the servers and I have sufficient free space on them - storage is presented to vSphere from the SAN.
    My question is: how exactly does the data get to its final destination on the database server? Does it go through a C: drive on one of those servers and that's why I'm getting the error message? Is there a specific service I can check to see if it's running
    to pinpoint the location of the OneDrive integration?
    Thanks in advance.

    Did you check for quotas on the MySite Site Collection? By default, I believe it is 100MB. Also, no one file can be greater than 2GB. This is a SharePoint limit.
    Trevor Seward
    Follow or contact me at...
    &nbsp&nbsp
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

Maybe you are looking for

  • Javascript error for Inserting Pages from a source

    Below is a script I wrote that isn't functioning properly on my large 200 page document that I need it to. Granted there might be a much easier way to script this, but I'm no expert. I have a 200 page document that needs to be 600 pages, basically ev

  • Getting error while getting ACK back from TP

    Hi, When my TP is sending ack back to me I am getting following error - 2008.12.24 at 11:06:19:672: Thread-10: B2B - (DEBUG) oracle.tip.adapter.b2b.tpa.RepoDataAccessor:getDocumentDefinition() given docTypeName: Pip3A4PurchaseOrderRequest given docTy

  • What format do I use to export a 100MB movie?

    I need to export my movie which is 20 minutes to 100MB I have tried to use the iPod format that gets me to 136MB but the program I am uploading to is very specific.  I have also tried a condenser which shortens it to 5minutes but it also has to be ex

  • Event in wd abap

    Hi, i am having a event in component controller. event handler is made in first view. Now how can i fire the event from second view, so that event handler in first view wil get trigered. Regards, Pankaj Aggarwal

  • Embedding All Placed Images in a Document

    Is there any way to automatically embed all the placed images in a document, or do they need to be handled one by one?