RCD join with TCD question

When I search the RCD table for a specific date range and calltypeid, the number is always slightly lower than the TCD table filtering on the same date range and calltypeid, but also filtering on the peripheralcalltype of 2 and peripheralid of the agent pim (only the agent leg of routed calls which are only inbound acd calls in this instance).
The goal being to capture some additional information about the calls that is in the TCD but not the RCD, but also this particular customer requires the call counts to match what they're getting in their skill_group/skill_group_interval reports. So if I start with the RCD and pull in the additional data from the TCD table, that seems to be the most appropriate solution.
...but I don't know how to join to the TCD pulling in the data from the agent leg only. I don't need any data from transfers, conferences, etc. Just the one row.
Any help would be appreciated.
thanks,
will

Will,
You can join data from the same call by matching RouterCallKeyDay and RouterCallKey between the two tables. You could probably ensure the CallTypeID is the same between both as well, for good measure.
Agent leg only should be fairly straightforward... try:
WHERE TCD.AgentSkillTargetID IS NOT NULL
Perhaps also match on TCD.AgentPeripheralNumber (or maybe InstrumentPortNumber) = RCD.Label... this would rule out potential duplicates from transfers to the same Call Type, or RONAs without a Call Type change.
Now... the only potential problem I see here which may cause a little difficulty - in my experience, I see a lot of TCD entries where (within the same RouterCallKey-RouterCallKeyDay combo in TCD) the CallTypeID is NOT on the same RouterCallKeySequenceNumber entry as the AgentSkillTargetID. So, you may have to join to the TCD table twice if you're filtering on CallTypeID and just want the agent leg. If you want to bring in data such as the Call GUID as well, you will likely be forced to do multiple joins like this as I'm not sure I've ever seen Call GUID on the Agent leg in TCD.
-Jameson

Similar Messages

  • Nested join with left - question

    Hi Experts,
    I have a special query requirement
    Here are the three tables A, B & C
    TABLE-A
    A_ID
    Type
    A1
    Call
    A2
    Web
    A3
    Call
    A4
    TV
    A5
    TV
    TABLE-B
    B_ID
    Ord_Type
    A_ID
    B1
    US
    A3
    B2
    DE
    A4
    B3
    UK
    A5
    TABLE-C
    C_ID
    B_ID
    C_VAL
    C1
    B1
    10
    C2
    B3
    20
    I need to write  a query to get the following results
    Total A
    Total Bs with Val
    Sum C_VAL
    5
    2
    30
    So want to include all rows from A and include only the rows from B that has a corresponding value in C.
    Would someone please help?
    Thanks,
    AP

    with
    table_a as
    (select 'A1' a_id,'Call' a_type,101 proj from dual union all
    select 'A2','Web',101 from dual union all
    select 'A3','Call',101 from dual union all
    select 'A4','TV',101 from dual union all
    select 'A5','TV',101 from dual union all
    select 'A6','ABC',201 from dual union all
    select 'H5','ABC',301 from dual
    table_b as
    (select 'B1' b_id,'US' ord_type,'A3' a_id from dual union all
    select 'B2','DE','A4' from dual union all
    select 'B3','UK','A5' from dual union all
    select 'B4','UK','H5' from dual union all
    select 'B5','UK','' from dual
    table_c as
    (select 'C1' c_id,'B1' b_id,10 c_val from dual union all
    select 'C2','B3',20 from dual union all
    select 'C3','B4',40 from dual
    select max(a.total) total_a,
           count(*) b_ids_in_c,
           sum(c.c_val) sum_c_val
      from (select a_id,
                   count(*) over (partition by proj) total
              from table_a
             where proj = 101
           ) a,
           table_b b,
           table_c c
    where a.a_id = b.a_id
       and b.b_id = c.b_id
    TOTAL_A
    B_IDS_IN_C
    SUM_C_VAL
    5
    2
    30
    Regards
    Etbin

  • How to dynamically create a table to join with

    I have a table of users and when they should submit time sheets: start date and end date.
    I have a table of timesheets with user ID and week-ending date.
    I need to construct a report of which timesheets are missing this year.
    I effectively need a table of week-ending dates for the year to join with the user and table and filter on start/end dates - and derive a list of week-ending dates for which I expect to see timesheets.
    But I donu2019t have write-access to the database: Can I effectively create a local table with the week-ending dates for the year?
    We currently solve it by using a local Excel file. Is that the most efficient way? It is also a nuisance as we have to edit the report and copy the excel file when we move directories.
    2nd question on the forum
    Mike

    Mikecro,
    Trying to actually write a SQL script of any complexity in the Command window itself is a horrible experience. I'd recommend writing your SQL in SSMS and testing it there. Once you have the script written in SSMS and it producing the desired result set you can then copy and paste it into the CR Command. (Just use hard coded dummy parameters in SSMS and replace them once they're pasted into the command.)
    If you are building "canned" reports that will ship with a software package, I'd recommend building it out as a stored procedure (and the same with any other reports). This will also make future support much easier by allowing you to make any modifications to the data set directly on the SQL Server without having to touch CR or CRS.
    If you're acting as a 3rd party consultant and you don't have the access or authority to add SP objects to the SQL Server then sticking with the Command is going to be your best bet. This is still better than using linked tables IMO.
    #1) CR simply lacks the ability to write SQL with any real level of complexity. It can't even create a simple sub-query.
    #2) It looks more professional. From an end users pov a report that uses a sql command, as opposed to linked table, demonstrates that the report developer is of a more advance skill level.
    #3) Most of your clients won't know how to write SQL themselves so they will need to re-engage your services to take care of any existing reports and to build new ones. It's easier to get repeat business than it is to get new business.
    As you've already seen, getting everything into a single, well written, SQL command can make a dramatic improvement in report performance. If you get in the habit of building all of your reports using SPs, Views or Commands, you'll quickly come to appreciate added flexibility it affords you. Once to modify your report building workflows to accommodate the change, you won't even think about going back.
    HTH,
    Jason

  • I got a flashing folder with a question mark. I got a new hard drive and upgraded to 4 gigs and can't open anything or reload the operating system? Help?

    I got a flashing folder with a question mark. I got a new hard drive and upgraded to 4 gigs and can't open anything or reload the operating system? Help? FYI: I have been using boot camp with windows 7 and started getting a kernal_data_Page_error and it would reboot windows, i was trying to do a chkdsk on the next reboot, but thats when i started getting this issue. I have put in a new hard drive and went from 2 gigs to 4. I can not get the computer to do anything, even the monitor does not show anything now????

    Prep your new drive:
    Drive Preparation
    1. Boot from your OS X Installer Disc. After the installer loads select your language and click on the Continue button.  When the menu bar appears select Disk Utility from the Utilities menu.
    2. After DU loads select your hard drive (this is the entry with the mfgr.'s ID and size) from the left side list. Note the SMART status of the drive in DU's status area.  If it does not say "Verified" then the drive is failing or has failed and will need replacing.  SMART info will not be reported  on external drives. Otherwise, click on the Partition tab in the DU main window.
    3. Under the Volume Scheme heading set the number of partitions from the drop down menu to one. Click on the Options button, set the partition scheme to GUID (for Intel Macs) or APM (for PPC Macs,) then click on the OK button. Set the format type to Mac OS Extended (Journaled.) Click on the Partition button and wait until the process has completed.
    4. Select the volume you just created (this is the sub-entry under the drive entry) from the left side list. Click on the Erase tab in the DU main window.
    5. Set the format type to Mac OS Extended (Journaled.) Click on the Security button, check the button for Zero Data and click on OK to return to the Erase window.
    6. Click on the Erase button. The format process can take up to several hours depending upon the drive size.
    After formatting has completed quit DU and return to the installer. Install OS X.

  • White Macbook has folder with a question mark inside when powered on.

    My brother has a white macbook given to him from a friend and when it is powered on it shows a folder icon with a question mark in the inside flashing and it doesn't boot. He has sent me on a quest to get a power adapter and a new hard drive, He thinks the hard drive is fried. Does anyone know for sure if thats the case, I just don't want to buy all that stuff to figure out that the logic board is dead or something else irreplaceable. There is no backup disks, all I have is a replacement leopard disk from apple used for my mac mini.

    If it is a retail Leopard disc--black with a giant purple X on it--then yes, you could use them, with a couple of caveats. One, it would technically be a violation of the license to use that install of Leopard on more than one computer, and terms of use on this forum forbid me from encouraging such an action. And two, depending on how old this used MacBook is, your install of Leopard may pre-date manufacture of the MacBook and, as a result, not be able to boot the MacBook anyway. However, judging by the info in your signature, that is probably not a problem.
    If the disc for your Mini is gray and shipped with or was meant to ship with the Mini, then no, the disc will not work.
    I still encourage you to get the system discs that came with the MacBook originally, as they have the Apple Hardware Test included, and, as I suggested above, running any OS (or other Apple software) on a Mac without the discs means technically it's an unlicensed copy.

  • When I boot up my I get a grey screen with a flashing folder with a question mark

    I was trying to set up a bootable Linux flash drive for another computer using UNetbootin and I accidentally selected an empty partition on my hard drive instead of the USB I was trying to use. It went through the install process, and I didn't realize it was on my computer rather than the USB. The computer worked fine, so I thought nothing of it.
    Today, I go to mess with my computer and it is frozen at the login screen. I restart it, and now I just get a blinking folder with a question mark. I try to go into recovery, but it isn't there. Internet Recovery works fine, but when I go to use Disk Utility or to reinstall the OS it cannot find the internal Hard Disk.
    What am I supposed to do here? I don't want to lose all my data.

    greenbil1
    You can contact AppleCare to buy a replacement set of the oringinal Install discs for a nominal cost. You will need the serial number and a credit card to place the order.

  • Problem with outer join with filter on join column

    Hi,
    In physical layer I have one dimension and two facts, and there's an outer join between the facts.
    dim_DATE ,
    fact_1 ,
    fact_2
    Joins:
    dim_DATE inner join fact_1 on dim_DATE.DATE = fact_1.DATE
    fact_1 left outer join fact_2 on fact_1.DATE = fact_2.DATE and fact_1.SOME_ID = fact_2.SOME_ID
    When I run a report with a date as a filter, OBIEE executes "optimized" physical SQL:
    select fact1.X, fact2.Y
    from
    Fact_1 left outer join on fact_1.DATE = fact_2.DATE and fact_1.SOME_ID = fact_2.SOME_ID
    where Fact_1.DATE = TO_DATE('2009-05-28' , 'YYYY-MM-DD' )
    and  Fact_2.DATE = TO_DATE('2009-05-28' , 'YYYY-MM-DD')
    The filter on Fact_2.DATE effectively replaces outer join with inner.
    Is there a way to disable this "optimization", which is actually very good for inner joins, but doesn't allow outer joins?
    Thanks in advance,
    Alex
    Edited by: AM_1 on Aug 11, 2009 8:20 AM

    If you want to perform a Fact-based partitioning with OBIEE (two fact with the same dimension), you have to :
    * create in your physical layer for each fact table the joins with the dimension
    * create in the Business Model layer ONE star schema with ONE logical fact table containing the columns of your two physical fact table
    In this way when you choose minimal one column of your fact1 and one column of your fact2, OBIEE will perform two query against each fact table/dimension, join them with an OUTER JOIN and your problem will disappear.
    Cheers
    Nico

  • So i have a 2011 MacBook Pro and when i turned it on this morning a flashing folder came on with a question mark in the middle of it and it keeps flashing. So i tried googling any solutions and up so far nothing has worked. Please Help ?

    I tried googling several solutions, but so far nothing seems to work. Everytime i start up my laptop i press CMND+R to make it go to the repair disk utility but instead it takes me as if i have to install lion when i had Snow Leopard 10.6.8. When i do go to the repair disk utility, on the eft hand side shows two hardrives one is Untitled and another is Hitachi, i tried downloading snow leopard 10.6.8 onto a Re-writable disc  using my windows computer. When i insterted it onto the disc drive it came out under SUPER DRIVE and everytime i double click on the CD it says something about attaching images/ I also forgot to mention that the MAC OSX 10.6.8 Update shows on the left hand side on the bottom in DMG format. I dont know what else to do, please help?

    DestroyGalaxies wrote:
    a flashing folder came on with a question mark in the middle of it
    This is the firmware telling you it can't find a bootable OS X volume.
    Usually to solve this all you do is hold the option key down on the built in keyboard while booting the computer, this enters Startup Manager and then you choose OS X to boot, then in System Preferences > Startup Disk you change it to the boot volume and it tells the firmware.
    Everytime i start up my laptop i press CMND+R to make it go to the repair disk utility but instead it takes me as if i have to install lion when i had Snow Leopard 10.6.8.
    What you have is a 10.7 or 10.8 Recovery HD from when 10.7 or 10. was on the machine previously.
    The Macintosh HD partition only was erased and 10.6 installed on it, without erasing the entire drive like what should have occured to remove the Recovery HD partition.
    So you have a mucked up machine.
    i tried downloading snow leopard 10.6.8 onto a Re-writable disc  using my windows computer.
    Well there goes your problem there, your downloading illegal copies of Snow Leopard from a untrusted location.
    10.6 is not available for download, except from pirate sites. You likely have malware or a compromised system.
    I dont know what else to do, please help?
    What you need to do is call Apple via phone, tell them the make of your machine and order the appropriate 10.6 disks, they are inexpensive now. Some machines that came with 10.6.3+ origianlly need machine specific disks, other wise pre-10.6.3 Intel Macs can use the 10.6.3 white retail disks.
    Once you have the disks, you need to backup your personal information off the computer to a external storage drive using the emergency quick copy method, then disconnect it to prevent mistakes.
    Most commonly used backup methods
    Next follow this proceedure and make sure to select the ENTIRE drive on the far left with the drive makers name and size, this will erase the entire drive, then install 10.6 from the disk
    How to erase and install Snow Leopard 10.6
    When finished setup the machine and log onto the Internet and use Software Update to get current on 10.6.8
    Don't use pirated software, it's likely been compromised in some fashion.

  • Since upgrading to Mavericks, 10.9.1, pictures that come attached to emails no longer display.  There is only a blank space that after about 1 minute, has a small box with a question mark.  How can I go back to attached images?

    Since upgrading to Mavericks, 10.9.1, pictures that come attached to emails no longer display.  There is only a blank space that after about 1 minute, has a small box with a question mark.  Double clicking on the box will open the image in a separate window.  It's very slow and tedious for multiple images.  How can I go back to attached and displayed  images?  If I click on "Forward", the images appear instantly in the email to be forwarded.

    Scott,
    My problem seemed to fix itself.  Or, by shutting down the computer one night, instead of putting it to sleep, may have reset something.  Since updating to Mavericks, I always (or usually) let the computer sleep overnight or anytime I'm walking away from it.  A few days ago, I was updating notes for my kids about how to find all my stuff and how to turn on my computer, so I wanted to rewrite the start-up procedures for the iMac, just in case they ever need to.  Well, I shut it down one night so the following morning, I could write down each step.  Lo and behold, the images, etc. are all there again!  Solved, but I'm not sure why.
    Tom

  • I keep getting the little blue box with the question mark

    Hi
    I have 10.6.7 system software and my safari is 5.0.4
    I have called apple twice with this problem already but nothing has helped except for short times.
    I have reset safari about one dozen times and when I do I reset the top 7 items and I've emptied the cache in addition just in case. I've also taken my safari preference plist out of my library and trashed it.
    And I've run disk utilities many times and restarted my computer. Each thing I do will solve the problem for a short time, even up to a day or more (or less) but then it comes back. For instance on Facebook maybe 1/8th of the thumbnail images have the little blue boxes with the question marks but most don't. I can't figure it out. Sometimes even the iPAD safari gets them too but my firefox doesn't show them and neither does Safari on my eMac.
    Yesterday the question marks even showed up in ONE mailing on all 3 computers with the question marks in the blue boxes (meaning my iMac, my eMac and my iPad) but then it just all resolved after a few hours. This does sound like possibly a server problem except today it's happening (in Safari again) only on this iMac in Safari (not firefox) and not on the other two devices.
    One more thing, since they changed my radio on the roof for my wireless internet, the 5.8 phone cuts out the internet when I use it. The problem has gotten worse since they changed the radio to the same frequency as the phone, it's a much faster service than the 2.4 radio. I don't know if this is related or not.
    Thank you,
    Martha

    <Contact your ISP.
    Is it possible, Carolyn, that this would mainly and almost always be only affecting the iMac and Safari in the iMac if it were a server issue? Right now Safari has more blue boxes with question marks than ever and the eMac and iPad have none. Firefox on the iMac has none also.
    I should try a direct connection and by pass the router and see if that makes a difference.
    I will contact them tomorrow but I want to get clear in my head first all the facts and possibilities.
    Thanks!
    Martha

  • HT204088 Dear sirs,  Could you please help me on my problem with my apple ID  I create new account with security questions, and when I try to purchase paid application,it ask me for answers the questions but it's not working,  My account have 50$ and stil

    Dear sirs,
    Could you please help me on my problem with my apple ID
    I create new account with security questions, and when I try to purchase paid application,it ask me for answers the questions but it's not working,
    My account have 50$ and still didn't buy anything

    You need to ask Apple to reset your security questions; ways of contacting them include clicking here and picking a method for your country, phoning AppleCare and asking for the Account Security team, and filling out and submitting this form.
    (100546)

  • How to fix a problem with my book pro that has a gray screen with a folder with a question mark on it

    does any one know how to fix a problem with my book pro that has a gray screen with a folder with a question mark on it?

    Hello Mokhtary123 and welcome to Apple Support Communities,
    It will help us diagnose your problem to know the exact model, size, year built, RAM installed and OS you're running.
    But basically your system can't find the boot disk. Usually this is a symptom of a dead/dying/corrupted hard drive;
    A flashing question mark or globe appears when you start your Mac - Apple Support
    OS X Recovery
    http://support.apple.com/en-us/HT4718

  • How Can We Tune the Joins with "OR" Caluse ?

    Hi
    We've identified one Query in one of Our PL/SQL Stored Procedure which is taking huge time to fetch the records. I have simulated the problem as shown below. The problem Is, How can i tune the Jions with "OR" Clause. i have tried replacing them with Exists Caluse, But the Performance was not much was expected.
    CREATE TABLE TEST
    (ID NUMBER VDATE DATE );
    BEGIN
      FOR i IN 1 .. 100000 LOOP
        INSERT INTO TEST
        VALUES
          (i, TO_DATE(TRUNC(DBMS_RANDOM.VALUE(2452641, 2452641 + 364)), 'J'));
        IF MOD(i, 1000) = 0 THEN
          COMMIT;
        END IF;
      END LOOP;
    END;
    CREATE TABLE RTEST1 ( ID NUMBER, VMONTH NUMBER );
    INSERT INTO RTEST1
    SELECT ID, TO_NUMBER(TO_CHAR(VDATE,'MM'))
    FROM TEST ;
    CREATE TABLE RTEST2 ( ID NUMBER, VMONTH NUMBER );
    INSERT INTO RTEST2
    SELECT ID, TO_NUMBER(TO_CHAR(VDATE,'MM'))
    FROM TEST;
    CREATE INDEX RTEST1_IDX2 ON RTEST1(VMONTH)
    CREATE INDEX RTEST2_IDX1 ON RTEST2(VMONTH)
    ALTER TABLE RTEST1 ADD CONSTRAINT RTEST1_PK  PRIMARY KEY (ID)
    ALTER TABLE RTEST2 ADD CONSTRAINT RTEST2_PK  PRIMARY KEY (ID)
    SELECT A.ID, B.VMONTH
    FROM RTEST1 A , RTEST2 B
    WHERE A.ID = B.ID  
    AND ( (A.ID = B.VMONTH) OR ( B.ID = A.VMONTH ) )  
    BEGIN
    DBMS_STATS.gather_table_stats(ownname => 'PHASE30DEV',tabname => 'RTEST1');  
    DBMS_STATS.gather_table_stats(ownname => 'PHASE30DEV',tabname => 'RTEST2');
    DBMS_STATS.gather_index_stats(ownname => 'PHASE30DEV',indname => 'RTEST1_IDX1');
    DBMS_STATS.gather_index_stats(ownname => 'PHASE30DEV',indname => 'RTEST2_IDX2');
    DBMS_STATS.gather_index_stats(ownname => 'PHASE30DEV',indname => 'RTEST1_IDX2');
    DBMS_STATS.gather_index_stats(ownname => 'PHASE30DEV',indname => 'RTEST2_IDX1');
    END; Pls suggest !!!!!!! How can I tune the Joins with "OR" Clause.
    Regards
    RJ

    I don't like it, but you could use a hint:
    SQL>r
      1  SELECT A.ID, B.VMONTH
      2  FROM RTEST1 A , RTEST2 B
      3  WHERE A.ID = B.ID
      4* AND ( (A.ID = B.VMONTH) OR ( B.ID = A.VMONTH ) )
    Execution Plan
       0      SELECT STATEMENT Optimizer=CHOOSE (Cost=94 Card=2 Bytes=28)
       1    0   TABLE ACCESS (BY INDEX ROWID) OF 'RTEST2' (Cost=94 Card=1 Bytes=7)
       2    1     NESTED LOOPS (Cost=94 Card=2 Bytes=28)
       3    2       TABLE ACCESS (FULL) OF 'RTEST1' (Cost=20 Card=100000 Bytes=700000)
       4    2       BITMAP CONVERSION (TO ROWIDS)
       5    4         BITMAP AND
       6    5           BITMAP CONVERSION (FROM ROWIDS)
       7    6             INDEX (RANGE SCAN) OF 'RTEST2_PK' (UNIQUE)
       8    5           BITMAP OR
       9    8             BITMAP CONVERSION (FROM ROWIDS)
      10    9               INDEX (RANGE SCAN) OF 'RTEST2_IDX1' (NON-UNIQUE)
      11    8             BITMAP CONVERSION (FROM ROWIDS)
      12   11               INDEX (RANGE SCAN) OF 'RTEST2_PK' (UNIQUE)
    Statistics
              0  recursive calls
              0  db block gets
         300332  consistent gets
              0  physical reads
              0  redo size
            252  bytes sent via SQL*Net to client
            235  bytes received via SQL*Net from client
              2  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
              2  rows processed
    SQL>SELECT /*+ ordered use_hash(b) */ A.ID, B.VMONTH
      2    FROM RTEST1 A, RTEST2 B
      3   WHERE A.ID = B.ID  AND(A.ID = B.VMONTH OR B.ID = A.VMONTH)
      4  ;
    Execution Plan
       0      SELECT STATEMENT Optimizer=CHOOSE (Cost=175 Card=2 Bytes=28)
       1    0   HASH JOIN (Cost=175 Card=2 Bytes=28)
       2    1     TABLE ACCESS (FULL) OF 'RTEST1' (Cost=20 Card=100000 Bytes=700000)
       3    1     TABLE ACCESS (FULL) OF 'RTEST2' (Cost=20 Card=100000 Bytes=700000)
    Statistics
              9  recursive calls
              0  db block gets
            256  consistent gets
            156  physical reads
              0  redo size
            252  bytes sent via SQL*Net to client
            235  bytes received via SQL*Net from client
              2  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
              2  rows processed

  • How do I get rid of the flashing file with a question mark in it?

    I wanted to start clean on my MacBook Pro osx 10.9.4. So I did the command r and erased what I thought was the right one. I restarted my computer and did the command r again and what came up was internet recovery. It can't find my internet because it's WEP and I don't know to change it to wpa. So I restarted my computer again and I didn't do the command r but just let it load itself to see what would happen and all I get is a flashing file with a question mark. I don't know what to do. Someone please help me.

    Do you get this display?
    If so, you have to select an Internet connection.  Do not expect quick response time in this mode.  All activities in this mode will be lengthy.
    Ciao.

  • Why do some of my emails have blue squares with a question mark instead of a picture or bar code?

    Why do some of my emails have blue squares with a question mark instead of a picture or bar code?

    No app installed that will view the pics and bar codes.  
    Which email client are you using?  Which version? 
    File suffix of the pics & bar codes?  Example:  .pic, .bmp, .jpg, etc. 

Maybe you are looking for