A query with the weeks/months/quarters without filling data

During recovery of monthly data from any data source, experts how CF (which I am not one) creates results for the time intervals where there is no results? I.E. event data to draw per month, how can I show that there can be no activity for a given month? Thanks in advance.

There is a way to make more efficient approach to dempster.

Step 1: run your query from the database. (1 queries)
Step 2 - create a cold fusion query to get all years-months in the range of dates of interest (2 requests)
Step 3 - make a query of queries for years-monthly query 2 that are not in the application 1. (3 requests)
Step 4: make a query of queries that questions 1 and 3 trade unions.

Tags: ColdFusion

Similar Questions

  • A printer that works exclusively with the iPad 2 air without a computer

    can someone suggest a printer that works with the iPad 2 air without a computer at all

    AirPrint printers must be able to do.

    AirPrint allows to print from your iPhone, iPad or iPod touch - Apple Support

  • Can I get a renewal of my membership with the 2 month for free?

    Can I get a renewal of my membership with the 2 months free?

    Please contact support:

    Contact the customer service

    Concerning

    Megha Rawat

  • SQL query with the troubleshooting Subselects

    I have a query with the 3 Subselects. Each of the Subselects works very well on its own. I run the query in Oracle SQL Developer and get ORA 933 "sql command not completed successfully" at 47 48 line pass. I am unable to say what is causing the error. The pointers you know sincerely!

    Here is the code:
    SELECT 
      adjud.country,
      adjud.site,
      adjud.prodtype,
      sum(adjud.acount) + sum(denied.dcount) as TotalClosed,
      case when adjud.adtype = 'Paid' then adjud.acount End as NumPaid,
      case when adjud.adtype = 'Paid' then adjud.totalpaid End as AmtPaid,
      count(adjud.contest) + count(denied.contest) + count(pend.contest) as CntContestable,
      sum(pend.pcount) as PendingCount,
      Case when pend.overunder = 'Over' Then count(pend.pcount) End as Over90Count,
      sum(pend.facevalue) as PendingAmount
    From 
    ( select 
        count(clm.clm_nbr) as acount, 
        sum(clm.rsrv_amt) as facevalue,
        sum(clm.tot_pd_amt) as totalpaid,
        clm.prdt_type_nm as prodtype,
        clm.cntsbl_indc as contest,
        case when clm.exam_co_cd in ('107','134')
          then 'Hong Kong'
          else 
            case when clm.exam_co_cd = '234'
              then 'Singapore'
              else 'US'
            End
        End as country,
        clm.exam_admin_site_cd as site,
        Case when clm.rmk_cd in ('R00', 'R01', 'R02') then 'Denied' Else 'Paid' End as adtype
      from afp_cds.claim_vw clm
      where 
        clm.adjud_dt is not null and 
        clm.adjud_dt > :startDate and
        clm.adjud_dt < :EndDate
      group by 
        clm.prdt_type_nm,
        clm.cntsbl_indc,
        case when clm.exam_co_cd in ('107','134') 
          then 'Hong Kong'
          else 
            case when clm.exam_co_cd = '234'
              then 'Singapore'
              else 'US'
            End
        End,
        clm.exam_admin_site_cd,
        Case when clm.rmk_cd in ('R00', 'R01', 'R02') then 'Denied' Else 'Paid' End
    ) as adjud, 
    ( select 
        count(clm.clm_nbr) as dcount,
        sum(clm.rsrv_amt) as facevalue,
        clm.prdt_type_nm as prodtype,
        case when clm.exam_co_cd in ('107','134') 
          then 'Hong Kong'
          else 
            case when clm.exam_co_cd = '234'
              then 'Singapore'
              else 'US'
            End
        End as country,
        clm.exam_admin_site_cd as site,
        clm.cntsbl_indc as contest
      from afp_cds.claim_vw clm
      where 
        clm.deny_dt is not null and
        clm.deny_dt > :startDate and
        clm.deny_dt < :EndDate
      group by
        clm.prdt_type_nm,
        case when clm.exam_co_cd in ('107','134') 
          then 'Hong Kong'
          else 
            case when clm.exam_co_cd = '234'
              then 'Singapore'
              else 'US'
            End
        End,
        clm.exam_admin_site_cd,
        clm.cntsbl_indc
    ) as denied,
    ( select 
        count(clm.clm_nbr) as pcount, 
        sum(clm.rsrv_amt) as facevalue,
        clm.prdt_type_nm as prodtype,
        case when clm.exam_co_cd in ('107','134') 
          then 'Hong Kong'
          else 
            case when clm.exam_co_cd = '234'
              then 'Singapore'
              else 'US'
            End
        End as country,
        clm.exam_admin_site_cd as site,
        clm.cntsbl_indc as contest,  
        case when sysdate - clm.regtrtn_dt > 90 then 'Over' else 'Under' End as overunder
      from afp_cds.claim_vw clm
      where
        clm.adjud_dt is null and
        clm.deny_dt is null
      group by
        clm.prdt_type_nm,
        case when clm.exam_co_cd in ('107','134') 
          then 'Hong Kong'
          else 
            case when clm.exam_co_cd = '234'
              then 'Singapore'
              else 'US'
            End
        End,
        clm.exam_admin_site_cd,
        clm.cntsbl_indc,  
        case when sysdate - regtrtn_dt > 90 then 'Over' else 'Under' End
    ) as pend
    
    where
      adjud.prodtype = denied.prodtype and
      adjud.country = denied.country and
      adjud.site = denied.site and
      adjud.contest = denied.contest and
      adjud.prodtype = pend.prodtype and
      adjud.country = pend.country and
      adjud.site = pend.site and
      adjud.contest = pend.contest 
    group by
      adjud.country,
      adjud.site,
      adjud.prodtype,
      case when adjud.adtype = 'Paid' then adjud.acount End,
      case when adjud.adtype = 'Paid' then adjud.totalpaid End,
      Case when pend.overunder = 'Over' Then count(pend.pcount) End

    Do not use "Sub" with the table alias.

    Change this stmt type:

    ) as adjud,
    

    TO

    ) adjud,
    
  • How can I create a query with the data control to the web service?

    I need to create a query with the order of web service data, WSDL, it is query operation, there is a message of parameter with possible query criteria and a return message contains the results. I googled but can't find anything on the query with the web service. I can't find a criterion "named" to the data control of web service as normal data control. Blog of Shay, I saw the topics on the update with the data of web service command. How can I create a query with the data control to the web service? Thank you.

    Hello

    This might help

    * 054.     Search form using control data WS ADF and complex of entry types *.

    http://www.Oracle.com/technetwork/developer-tools/ADF/learnmore/index-101235.html

  • I'm drawing a curved line with the pen tool, but he fills in a solid form.  I want only the line - what I have to change?

    I'm drawing a curved line with the pen tool, but he fills in a solid form.  I want only the line - what I have to change?

    pmreagans,

    Set the fill to zero at the bottom of the Toolbox.

  • A query with workingdays by month and per period

    Can someone help me on how to build a SQL query that is difficult?

    I work with SQL Oracle. It is intended to be calculated over a certain period, to find the working days of each month for each person.

    I have a request to work to calculate the number of days 1 month less holidays

    SELECT count (*) NUM_WORK_DAYS
    De)
    Select to_date (January 1, 2010 ", 'dd-mm-yyyy') + ROWNUM-1 day
    Of object
    Where ROWNUM < to_number (to_char (last_day (January 1, 2010 '), JJ ')) + 1).
    Where to_number (to_char (day, 'd.')) between 1 and 5
    And not exists (select NULL
    Holiday
    Where Holiday.hol = day)

    There is a datetable with the following structure where I can get the periods:
    DATES
    YEAR | MONTH | WEEK | SD
    2010 | 201002 | 201006 | 02/09/2010
    All the required month are present
    It is expected that the user gives a start and specify an end time.

    I have a table of workingdays per person named
    CALENDAR
    CAL | MY | MAR | SEA | GAME | FRI | SAM | SUN
    Nobody | THERE | THERE | N | THERE | THERE | N | N

    And an array of holidays
    HOLIDAY
    CAL | HOL
    Nobody | 01/01/2010

    How can I combine the query for the business days and create a query that returns the number of workingdays by month for many people for several months? I will ask the user to give a start point and an end of period

    I am aware that I ask a lot of your time, but I can't imagine the solution myself. Thanks in advance

    GR,
    Els

    You can change the query in this way:

    with period as (
    select DATE '&start_day' start_date, DATE '&end_day' end_date
      from dual),
    days as (
    select start_date+level-1 day
      from dual,period
    connect by level <= end_date-start_date+1),
    mycal as (
    select person, 'monday' day, mon works from calendar union all
    select person, 'tuesday' day, tue from calendar union all
    select person, 'wednesday' day, wed from calendar union all
    select person, 'thursday' day, thu from calendar union all
    select person, 'friday' day, fri from calendar union all
    select person, 'saturday' day, sat from calendar union all
    select person, 'sunday' day, sun from calendar
    )
    select person, to_char(d.day,'yyyymm') month, count(0)
      from mycal c, days d
     where c.day = trim(to_char(d.day,'day'))
       and c.works='Y'
       and not exists (select 1 from holiday h where h.person=c.person and h.hol=d.day)
    group by person, to_char(d.day,'yyyymm');
    

    Max
    http://oracleitalia.WordPress.com

  • selection of the week, month, year in source throgh odi 11g?

    Hello

    I have 3 years of data in a source table (tableatm). data will be added to this table eod.

    img2.jpg

    I applied the filter on the column atm_date below screenshot

    Based on the filter, I want to load the data of the year underway, data of the current month data of the week underway, data from the previous month, data from the previous week, data from the previous year to this table.

    If I want to load data for 2010, then filter applied on TO_CHAR (TABLEATM. ATM_DATE, 'YYYY') = '2010' , I get only the data of 2010.

    If want to download data from 2015, filter applied on TO_CHAR (TABLEATM. ATM_DATE, 'YYYY') = "2015". But it's constant...

    I want to give the filter like that.

    TO_CHAR (TABLEATM. (ATM_DATE, «YYYY») = double '(sélectionnez (sysdate,-12)) ". When I applied the filter using this formula on this date column. I don't get all the data.

    Please help me...

    img1.jpg

    Please help me,

    Thanks in advance,

    A.Kavya.

    Hello

    I applied the dynamic filter as shown below. now, I get only the data of the year 2015...

    filter condition is

    TO_CHAR (to_number (to_char (TABLEATM. ATM_DATE, "YYYY"))) = (SELECT to_char (to_number (to_char (SYSDATE, 'YYYY'))-1)

    THE DOUBLE)

    Thanks & regards,

    A.Kavya.

  • Performance is worse with the GPU acceleration that without

    I have a Windows 7 system fast, i7 980 X processor with a monitor @ 2560 x 1440 pixels. As a photographer, I'm processing of thousands of photos and my PC can not be fast enough, so I thought that I invest a little in a new graphics card. OK, I have not bought a Quadro, but with GTX 970 from Nvidia, I always feel a modern, fast, with a value of more than $ 400 map.

    My first experiences after the installation of the new graphics card are more then disappointing - a lot is worse, running without any GPU acceleration. Before, I could scroll an image to the image almost no imperceptible lag. With the GPU acceleration turned on, each image must be "rendered" first first you get a blurry picture of Pexelated / of complitely and flackers of color shortly, then after a while, it becomes more clear. So it seems that with GPU acceleration turned on, Lightroom 6 completely ignores the preview images pre-rendered - FACT IT MAKE any SENSE WHAT? Yes, all the sliders mode develop work faster, but the preview shown instantly image is a false low resolution and it always takes time for an image high resolution to display - as much time, as it should, making it with a CPU.

    For me, it would make sense that next image will be loaded into GPU memory by actually DURATION and rendering the previous image would be preserved in memory as well. Also miss me some detail for the GPU acceleration settings - if it remains at the current level, rudimentary, (for me) the best compromise would be to disable the GPU acceleration to scroll through the photos, but using just to develop sliders.

    I would want guus at Adobe to improve the product real, not just marketing slogans on the improvement of performance!

    kirillxxx wrote:

    . My suggestion is simple enough - if the guys at Adobe can not program properly, the easiest would be (to make an option) to disable the GPU acceleration for image swithiching and just take his profit for the developer sliders.

    You can not simply switch off to change the image. The image * should be loaded into the GPU, which is where the delay comes from. Even though you might think about what would happen: of course the image would change quickly, but then you would still wait before you can deal with.

    For now the acceleration GPU in LR is very it is childhood: things first generation, and we are all good enough beta testers.

    Some people are lucky: they love him and have no problem.

    Some people are out of luck: it causes nothing but problems.

    Some people like me are sitting on the fence: we have mixed experiences.

    I don't think you threw $400, at some point (I live in optimism) questions will be fixed and LR will work on your system. He just had to wait. Isn't is funny, but you only need to take a casual look at any photography forum to see that there are problems with GPU acceleration and now is not the time to buy the latest and greatest card.

    I've personally held off buying a new card to replace my aging one until I see that there is zero chance of all the problems of proof.

  • Select the query with the level line list where the clause

    Hi all

    I am creating a tabular presentation based on a SQL query that has a list of selection based on a query with a where clause clause that refers to a column in the original SQL query.

    The situation is, I have a table that stores the client_id, source_id, and build_id, lets call it client_source. I have a second table, build_source, containing source_id and build_id, one to many relations between the two (1 source_id could have build_id 1-7).

    Using a tabular presentation, I want to select the correspondent build_id to use in client_source, but the selection list should contain only the build_id for this particular source_id of lines.

    Here is an example of the SQL source of tabular presentation;

    Select
    s.ROWID,
    s.CLIENT_ID,
    s.SOURCE_ID,
    APEX_ITEM. SELECT_LIST_FROM_QUERY (1, s.BUILD_ID,)
    "Select display b.build_id, b.build_id return.
    b build_source where b.source_id = s.SOURCE_ID ') lst
    of s client_source

    what I want to achieve, it's as source_id "BOLD" match fields. When the query is built this way, I get an error of "invalid identifier" Oracle on s.SOURCE_ID during execution.

    Is there some special tags to be used to refer to the external column? I must be missing something because this looks like a pretty mundane problem.

    I am running on 4.1.0.00.32, on an Oracle 10 g release 10.2.0.4.0 Server Express request.


    I look forward to useful responses!


    See you soon,.
    Jason

    Published by: 1005131 on May 9, 2013 19:02

    Your selection by query list receives a static SQL. That SQL can't "see" the value of your s.source_id.
    But it would work like this:
    where b.source_id = ' | s.SOURCE_ID)

    You would be the value for the SQL concatenation. It is not ideal, but it will work.

    Jorge

  • Query for the weekly report

    Hello
    I wrote a query to get a weekly report, which is expected to start a week from Sunday to Saturday typical. for example, the week is 03/04/2011 to 04/09/2011 I run the query or the task on Word to say about any of the week of 10/04/2011, 04.11.2011 etc... Here's my query, but it seems to work of the sysdate to-7 days that does not receive the Sunday to Sam requirement... someone can you please...

    Select uid, psn, TO_char(date_in,'mm/dd/yyyy')
    OF THE TEST
    WHERE the uid like '% % ST.
    and date_in > trunc (sysdate)-7
    ORDER BY date_in CSA;
    Thank you.

    If you want that data for the week previous ? In if so then just tweak the settings a bit:

    SELECT uid
         , psn
         , TO_char(date_in,'mm/dd/yyyy')
    FROM   test
    WHERE  uid LIKE '%ST%'
    AND    date_in >= TRUNC(SYSDATE,'IW') - 8
    AND    date_in < TRUNC(SYSDATE,'IW') - 1
    ORDER BY date_in ASC
    ;
    
  • outer join on query with the GOLD clause

    Hi all, I have a problem outerjoining a clause or a request with
    Here's my data
    WITH table1 AS
    (
     SELECT  'test' txt1, 'pak' txt2, 'ced' txt3, 'su' txt4 FROM dual UNION ALL
     SELECT  null txt1, 'pak' txt2, 'ced2' txt3, 'su2' txt4 FROM dual UNION ALL
     SELECT  null txt1, NULL txt2, 'ced3' txt3, 'su3' txt4 FROM dual UNION ALL
     SELECT  null txt1, NULL txt2, null txt3, 'su3' txt4 FROM dual UNION ALL
     SELECT  'text5' txt1, NULL txt2, null txt3, 'su3' txt4 FROM dual UNION ALL
     SELECT  null txt1, NULL txt2, null txt3, null txt4 FROM dual 
    
    
    )
    ,table2 AS
    (
     SELECT 111 pid, 'test' txt1, 'pak4' txt2, 'ced' txt3, 'su' txt4 FROM dual UNION ALL
     SELECT 222 pid, 'test1' txt1, 'pak' txt2, 'ced2' txt3, 'su2' txt4 FROM dual UNION ALL
     SELECT 333 pid, 'test2' txt1, 'pak3' txt2, 'ced3' txt3, 'su4' txt4 FROM dual UNION ALL
      SELECT 444 pid, 'test2' txt1, 'pak3' txt2, 'ced4' txt3, 'su3' txt4 FROM dual 
    
    )
    SELECT b.pid, a.*
    from table1 a, table2 b
    WHERE (a.txt1 = b.txt1 OR
           a.txt1 IS NULL AND a.txt2=b.txt2 OR
           Nvl(a.txt2, a.txt1) IS NULL AND a.txt3 = b.txt3 OR
           Nvl(a.txt2, a.txt1) IS NULL  AND a.txt3 IS NULL AND a.txt4 = b.txt4
           ) 
    as you can see I am attaching the table 1 and table 2. I join with txt1, if txt1 is null, then join by txt2, if null, then reach by txt3 and so on.
    the above produces this output code
    PID     TXT1     TXT2     TXT3     TXT4
    ===     ====     ===   ==== ====
    111     test     pak      ced     su
    222             pak      ced2     su2
    333                     ced3     su3
    444                          su3
    This output is partially correct. only 4 lines were in display and two has been left out
     SELECT  'text5' txt1, NULL txt2, null txt3, 'su3' txt4 FROM dual UNION ALL
     SELECT  null txt1, NULL txt2, null txt3, null txt4 FROM dual 
    I tried to use the outer join, but oracle will complain that I can't use outerjoin with the GOLD clause.

    can someone modify my query to display the output below?
    PID     TXT1     TXT2     TXT3     TXT4
    ===    ====      ===   ====  ====
    111     test     pak      ced     su
    222             pak      ced2     su2
    333                     ced3     su3
    444                          su3
    NULL  NULL   NULL    NULL   NULL
         test5 

    Not sure you can do it with the style of the Oracle of outer joins, but open ANSI style joins is simple, in fact exactly as you had it.

    SQL> set null null;
    SQL> WITH table1 AS (
      2   SELECT  'test' txt1, 'pak' txt2, 'ced' txt3, 'su' txt4 FROM dual UNION ALL
      3   SELECT  null txt1, 'pak' txt2, 'ced2' txt3, 'su2' txt4 FROM dual UNION ALL
      4   SELECT  null txt1, NULL txt2, 'ced3' txt3, 'su3' txt4 FROM dual UNION ALL
      5   SELECT  null txt1, NULL txt2, null txt3, 'su3' txt4 FROM dual UNION ALL
      6   SELECT  'text5' txt1, NULL txt2, null txt3, 'su3' txt4 FROM dual UNION ALL
      7   SELECT  null txt1, NULL txt2, null txt3, null txt4 FROM dual),
      8  table2 AS (
      9   SELECT 111 pid, 'test' txt1, 'pak4' txt2, 'ced' txt3, 'su' txt4 FROM dual UNION ALL
     10   SELECT 222 pid, 'test1' txt1, 'pak' txt2, 'ced2' txt3, 'su2' txt4 FROM dual UNION ALL
     11   SELECT 333 pid, 'test2' txt1, 'pak3' txt2, 'ced3' txt3, 'su4' txt4 FROM dual UNION ALL
     12   SELECT 444 pid, 'test2' txt1, 'pak3' txt2, 'ced4' txt3, 'su3' txt4 FROM dual)
     13  SELECT b.pid, a.*
     14  from table1 a
     15     LEFT JOIN table2 b
     16        ON (a.txt1 = b.txt1 OR
     17            a.txt1 IS NULL AND a.txt2=b.txt2 OR
     18            Nvl(a.txt2, a.txt1) IS NULL AND a.txt3 = b.txt3 OR
     19            Nvl(a.txt2, a.txt1) IS NULL  AND a.txt3 IS NULL AND a.txt4 = b.txt4);
    
           PID TXT1   TXT2   TXT3   TXT4
    ---------- ------ ------ ------ ------
           111 test   pak    ced    su
           222 null   pak    ced2   su2
           333 null   null   ced3   su3
           444 null   null   null   su3
    null       text5  null   null   su3
    null       null   null   null   null
    

    John

  • How to transpose the query with the following result

    Dear all,

    Can someone tell me a method to convert my query result

    Details are provided in

    http://obiee11ge.blogspot.com/2010/07/how-to-transpose-query-with-following.html

    Concerning

    Mustafa

    Hello

    Try this
    Create a request combined with,

    criterion no. 1: model, revenue (Actual), Cogs (Actual), Opex (Actual), PL (Actual)

    in the dummy column fx enter the "Real" value

    criterion 2: model, revenue (Yago), Cogs (YAgo), Opex (Yago), PL (Yago)

    in the dummy column fx enter the value as "Yago".

    criterion 3: model, revenue (Budget), Cogs (Budget), Opex (Budget), PL (Budget)

    in the dummy column fx enter the value as 'Budget '.

    Now go to the columns of result and set names coumn (revenue, COGS, Opex, PL) for the result set.
    For the Dumny, remove column header.

    In a sheet view, you will get the result.

    Thank you
    Vino

  • Problem with the week of the day in response OBIEE

    Is today April 17

    In Oracle Sql

    Select to_char (trunc (sysdate), 'WW') of the double-> returns 16

    But in RESPONSE

    WEEK_OF_YEAR (CURRENT_DATE)--> returns 15

    Why not the same value?

    Always best to first check the product documentation. This comes from the OBIEE Server Administration guide:

    + "When calculating the difference in weeks, the function calculates the difference in days and divided by seven before rounding. In addition, the function takes into account how the Oracle BI administrator has configured the start of a new week in the NQSConfig.INI file by using the FIRST_DAY_OF_THE_WEEK parameter (by default, Sunday). For example, with Sunday as the beginning of the week, the difference of weeks between 2000-07-06 (Thursday) and 2000-07-10 (the following Monday) gives a value of one week. With Tuesday as the beginning of the week, however, the function will return zero weeks since the fractional interval is entirely a special week. » +

    The difference is probably because Oracle uses a different start to the week or another calendar to calculate the week number. If you want to match, you probably have to expose the number of week of Oracle in your data using the Oracle function so that they match.

  • Union of CFC query with the query of database

    I try to call a Web service to return a query, and then run a parallel query in another database and the Union both with a query from the query. The Web service server and the local server are CF7, two MySQL running, both tables to access parallel structures. Web service returns what appears to be a normal interview CFDUMP, but then when I have UNION it with the second query, I get "incorrect select list ' or"Columns '1' equal number have different types (SMALLINT, JAVA_OBJECT)"errors. So apparently there's something different about the query from the webservice that is causing problems?

    Thanks, that fixed it. I didn't realize that CF had its own function Q of Q CAST. Here is documentation on this subject, where he escaped to others.

    http://livedocs.Adobe.com/ColdFusion/7/htmldocs/wwhelp/wwhimpl/common/html/wwhelp.htm?cont ext = ColdFusion_Documentation & file = 00001271.htm

    Adobe: It would be nice if the dip page for a main keyword as a CFQUERY would connect to all linked pages, like the one above. When searching for information using a special tag, it would be much more likely to find the related page.

Maybe you are looking for