Want to show Date Period for which Data Not Present ?

Hi friends
I have Notice Table.
Notice_id,
Notice_date and many more fields,
I have make group by on year(notice_date), month(notice_date). The query results in accurate data.
But it is diplaying like
2005/01
2005/02
2005/04
Like that it doesn't display the data for 2005/03 that is month of March as no data is there for that month,
I want to include the data for that month also. In fact I want take print the report for the given interval of month, Year.

what is your oracle version?
if you have 10g, you may want to use the model clause.
Example: count of hiredates per month in 1980,1981 in emp
SQL> select count(*) c,
  2      to_number(to_char(hiredate,'MM')) m,
  3      to_number(to_char(hiredate,'YYYY')) y
  4  from emp
  5  where to_number(to_char(hiredate,'YYYY')) in ('1980','1981')
  6  group by to_char(hiredate,'YYYY'),to_char(hiredate,'MM')
         C          M          Y
         1         12       1980
         2          2       1981
         1          4       1981
         1          5       1981
         1          6       1981
         2          9       1981
         1         11       1981
         2         12       1981ok, let's fill the blanks ...
SQL> select
  2  *
  3   from
  4  (
  5      select count(*) c,
  6     to_number(to_char(hiredate,'MM')) m,
  7     to_number(to_char(hiredate,'YYYY')) y
  8      from emp
  9      where to_number(to_char(hiredate,'YYYY')) in ('1980','1981')
10      group by to_char(hiredate,'YYYY'),to_char(hiredate,'MM')
11  )
12  model
13  partition by (y)
14  dimension by (m)
15  measures (c)
16  (c[for m from 1 to 12 increment 1]=c[cv(m)])
17* order by y,m
         Y          M          C
      1980          1
      1980          2
      1980          3
      1980          4
      1980          5
      1980          6
      1980          7
      1980          8
      1980          9
      1980         10
      1980         11
      1980         12          1
      1981          1
      1981          2          2
      1981          3
      1981          4          1
      1981          5          1
      1981          6          1
      1981          7
      1981          8
      1981          9          2
      1981         10
      1981         11          1
      1981         12          2if you do not have 10g, just google for pivot and you will find millions of solutions...
regards
Laurent

Similar Messages

  • I want to show date filed in hejri calendar (please ,please Help me )

    I want to show date filed in hejri calendar

    Hey hey, maybe the 4th time will be a charm.
    If you did any searching of this forum for Hijiri, you'd find that there is no support in ADF for it.
    If you are not using ADF, then you can give us all of the details.
    John

  • Want to show data from current month & prev month in single record on forms?

    Hello experts,
    i have this requirement:
    Table structure:
    MOnth       Division         totalAmount
    01-apr-2013      1               10000
    01-May-2013    1               20000
    01-apr-2013      2               30000
    01-May-2013    2               50000
    i want to display in forms like
    Form:
    Month  : 01-May-2013
    Month               Division               total               prev_Month          division               total                         dIFFERENCE
    01-May-2013               1              10000                01-Apr-2013               1               20000                        10000
    01-May-2013               2              30000                01-Apr-2013               2               50000                        20000
    I am using two procedure for fetching records for current month and previous month.
    but it will cause problem, if for some division previous month data not present.
    please suggest me some query with which i can fetch current and pre month data in single record.
    Please help me out.
    Thanks
    yash

    I'M NOT SURE BUT TRY IT ............
    select x.mn mnth, x.division, x.totalAmount total, y.mn prev_month,  y.division, y.totalAmount total, (y.totalAmount - nvl(y.totalAmount,0)) difference
    from
      (select month mn, division, totalAmount
      from table_name
      where month = (select max(month)
      from table_name
      ) x,
      (select month mn, division, totalAmount
      from table_name
      where month = (select add_months(max(month),-1)
      from table_name
      ) y
    where x.division = y.division(+)
    MOSTAFIZ MITUL
    DHAKA BANGLADESH

  • Limit PO : Enter a period for which you require this item

    Hi Experts,
    I am trying to create a Limit PO programatically using "BAPI_POEC_CREATE",
    i have filled all the necessary tables Item, partner,Org data , account assignment.
    However I did not find any field in BAPI_PO_ITEM_D structure where i can specify the period/duration for this limit PO.
    There is only one field DELIV_DATE to mention the delivery date.
    When i fill this i am getting an error "Enter a period for which you require this item".
    Any solution to this error?
    Regards,
    Ashish Shah

    We are using the extended classic scenario and the SAP standard process to create limit items.   For the PO that is created in ECC the to/from dates are in EKKO KDATB and KDATE respecitvely.
    On the SRM side those fields are in the table BBP_PDIGP  vper_start and vper_end
    The interesting thing now that I look at my test case.   The PO in SRM does not have a validity start and end date at the header level it is all at the line item level.   However, it looks like when it created the PO in the backend it used the to/from date from the first line item. 
    Hope this helps.
    Sandra

  • Please help apps. Crashing on 64 gb 4 gen touch. Run 5.0.1 I know the temp fix of logging in but want to fix report shows "low mmemory crash" which is not true

    Please help apps. Crashing on 64 gb 4 gen touch. Run 5.0.1 I know the temp fix of logging in but want to fix report shows "low mmemory crash" which is not true

    Why do you say "not true"? The 4G iPod only has 256 MB of memory and out of memoty errors are not uncommon with iOS 5.
    memory is different that the 8, 32 ir 64 GB or storage on the 4G iPods.
    To resolve double click the Home button and delete the apps from the mulitasking dock that you are not using and the power off and back on the iPod. You have to do that periodically.

  • How to pass column value which is not present in source criteria

    Hi,
    In one of my report I want to pass a column value from Source report(a pivot table) to target report. The column which I want to pass is not present in the sorce report criteria. Is there any work around for this issue.
    I added this column in criteria and hidden the column. But the issue is not solved.
    Best Regards,
    TKB.

    Swati,
    I am navigating from Summary report to detail report. I am prompting the required fields in detail report. But I want to pass one more column value explicitly, which is not present in source request.
    Best Regards,
    TKB.

  • How to compare 2 different database to get table name which are not present in second database

    How to compare 2 different database to get table name which are not present in second database

    Sorry cannot test it right now
    use db1
    go
    select * from sys.tables t where not exists
    (select * from db2.sys.tables s where t.object_id=s.object_id)
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • After writing an html report on a floppy disk and removing it, labview shows an error message window: disk not present

    after writing an html report on a floppy disk and removing it, labview shows an error message window: disk not present.
    My pc is based on asus motherboard. Labview 7 and Windows 2000 sp4 installed.
    The error message continue also if i stop the application that generated report on a: .
    I've got this problem only on a pc: on other machines i don't have this problem (Labview only continues to access floppy but it doesn't show any window).
    Find below an example: first press the button to create a report on a: then remove the floppy, after 30-35 sec i've got the error message
    Attachments:
    prova.vi ‏55 KB

    Hi,
    I tried your vi: I don't get any error message after removing the disk but LV7 keeps on accessing the drive at regular intervals even if you stop the vi and close it!!! This is not supposed to happen.
    The only way to stop it is exit LV7.
    If you don't use the file dialog and you wire a full path, you don't get any problem.
    I also created a very simple vi that conditionally writes a text file on a: and I got the same behaviour.
    This problem occurs only with LV7, I tried the same examples in LV6.1 and everything was fine.
    If anybody wants to try I attach this simple example,
    Alberto
    Attachments:
    salva_testo1.vi ‏22 KB

  • How to read value of the period for which the sales volume has been entered

    Hi Experts,
    In the transaction "/ncrm_ipm_d_usage_data", we have a scenario where a user can enter value in the "sales volume reported" column for more than one period. Now we need to read the period_from (date from) for the first "sales volume reported" value entered.
    For example: If a user enters values in "sales volume reported" column for the period_from 02/01/2009, 05/01/2009 & 08/01/2009. We need to read the first period_from value for which sales volume value is entered. Which means it should be 02/01/2009.
    Our issue is that we are unable to find the standard method or variable which holds this value. We found these classes through debugging but it does not help us.
    1. Class CL_CRM_IPM_USAGE_DATA
    Methods we found:
    1. FIND_CONTRACT
    2. MAINTAIN_DATA
    3. MAP_UI_DATA
    4. FILL_CUMULATED_I
    5. GET_USAGE_DATA_KEY
    Please help us to find the standard method or variable which reads the period_from for the first sales volume entered.

    Hi Student5088,
    I used a Copy-Block to create a delay for a certain number of values (time) of a signal. With that you can continuously compare signal at T1 with Signal at T1*0.5.
    Greetings
    Walter
    Attachments:
    Compare.DAC ‏28 KB

  • Creating Master to show only rows for which valid entries exist in Detai

    I have created a Master-Detail Form in my Apex application based off of views to tables in a private remote Database.
    In the Master-Detail Creation Wizard, at the "Link Master and Detail" page, I specified that the defined Primary Key in the Master Column should be equal to the corresponding Foreign Key in the Detail Column.
    My goal is to have my Master Form only display rows for which a valid corresponding entry exists in the Detail Form. Yet, the above setup returns all of the rows from the Master Table, even where the corresponding Detail entry is blank.
    Can you provide some light on what I'm doing wrong, and how I can accomplish what I want to do?
    Thank you!

    I have created a Master-Detail Form in my Apex application based off of views to tables in a private remote Database.
    In the Master-Detail Creation Wizard, at the "Link Master and Detail" page, I specified that the defined Primary Key in the Master Column should be equal to the corresponding Foreign Key in the Detail Column.
    My goal is to have my Master Form only display rows for which a valid corresponding entry exists in the Detail Form. Yet, the above setup returns all of the rows from the Master Table, even where the corresponding Detail entry is blank.
    Can you provide some light on what I'm doing wrong, and how I can accomplish what I want to do?
    Thank you!

  • Master data not present in the reporting cube

    Dear Experts,
    There is a scenario in report design for me.
    I have already created the Bex report and all the fields as mentioned are in the  sales report.
    Client now wants to include two more fields in the report.
    One is the keyfig  " Net value" which is present in the sales cube  and i have already included in the report
    and another field which is master data  0profit_center  is not present in the cube.
    Any ideas how can i include this  0profit center  data  so that i can display in the report?
    As far as i understand, I need to include this master data in the sales  Infocube which is being used for reporting.
    But i am pondering  upon the impact on the system because of this.
    Now i have checked the BI system and the ECC table. In VBRP table of ECC,  the profit center is present.
    But when i see in BI the profit center is not being loaded  from ECC but from flat file source system.
    So i am confused how to go forward.
    Can anyone suggest me  what should be my approach?
    Best Regards!!

    You didn't understand what we suggested.
    Rather than checking 0profit_ctr master data, you need to find the info objects(which are part of your cube) which have master data. in those 0profit_ctr can be a attribute. if yes then navigation settings will work.
    if not then you can add 0profit_ctr to info cube and user master data look up thru routine or option read from master data(bw 7.3).
    Other wise, directly add 0profit_ctr to your flat file data source(and cube) and maintain data thru flat file.
    To look up your cube and 0pfirt_ctr need to have relations with another info objects other wise not possible.

  • I'm using Iphone 5 .After updating it with the latest software i.e iOS 7.0.6 I'm not able to see the wats app and imsg on my notification until and unless i activate the "Show on Lock Screen" which was not same as in the earlier software version.Help plz

    I'm using Iphone 5 .After updating it with the latest software i.e iOS 7.0.6 I'm not able to see the wats app and imsg on my notification center when my phone is locked until and unless i activate the "Show on Lock Screen" under each application. which was not same as in the earlier software version.I dnt want my messages or watsapp msges to be displayed on home screen when locked but should be displayed on the notification center on lock condition.
    Please suggest a solution or @Apple please get a software release which can remove this bug .

    We aren't Apple, just users like you. Have you tried a reset? Hold down the home button along with the sleep/wake button until the screen goes black and you see the Apple, then let go. (No data loss)

  • Adding new attribute to Master data - Not present in ECC

    Hi,
    We want to add a new field in the master data object 0plant. the new field is not present in the R/3 side. So we are planning to maintain it manually.
    Is it feasible? Can someone explain how to approach the situation?
    Since it is not going to come in Process chain or any of the mappings below InfoObject will the process chains work properly?
    Regards

    Hi
    if you cant impliment any logic you cam maintani it mannually.
    First add attribute to master data object and activate.
    Do master data load if required.
    Then right click on materdata addtribute and manage -> content tab -> Content
    display complete data and you can maintain attribute values individually for all ercords one by one (will be pain even for 100 records).
    another alternative is of doing file upload for this attribute.
    Regards
    Sudeep

  • MM Report - Pending GRNs for which payment not made

    Hello Friends
    Is there any report availbale to view the pending GRNs for which payment has not been made.
    Best Regards
    Vijayakumar TVN
    Note: Subject line changed
    Edited by: Jeyakanthan A on Jun 16, 2011 2:32 PM

    Hi
    Is there any report availbale to view the pending
    GRNs for which payment has not been made
    there is no standard report in sap which link GRn and payement
    yes if you want to see po history ,then try t-code ME80FN but not sure it will work in 4.7 0r not
    or developm report
    see table EKBE to check po history for GRN and Invoice ,
    then pass this invoice number into BKPF into refernce field ( invocie number +fiscal year) and you will get Fi docuement for Header there for invoice
    after that pass docuement into table  BSAK where you will get vendor payement docuemnt.( clearnce docuemnt so you will come to know wheter payement made or not
    Regards
    Kailas Ugale
    Edited by: Jeyakanthan A on Jun 17, 2011 10:54 AM

  • How to populate values in DP key figure which is not present in Info Cube

    Hi
    We have a special Key figure in Demand Planning created for uplaoding Forecasts coming directly from customer,
    This key figure is not present in Info Cube and data doesnot pupulate in this key figure through Info cube build,
    Hence data in this key figure is to be loaded externally , Customer sends his forecasts through EDI messages, Now we want to update forecast from external customer in to this  special key figure,
    Please suggest some ways
    Thanks and regards,
    Nitin Lavhe

    Hi
    I think you can get loaded this information in the cube in any other key figure which is available in the info cube. Then while loading the data into planning area using TSCUBE, you can define the key figure assignment.
    In which you define data from which key figure of infocube has to be get loaded into which key figure of planning area. Here you can define the respective key figures.
    Please let us know if it helps you. Please let us know if you require any more information from our side.
    Thanks
    Amol

Maybe you are looking for

  • Crystal Reports 2008 Some problems

    I'm facing few problems with Crystal Reports 2008 : 1. When you desing a reports that have its page height greater than its width the reports force you to use a Landscape even if you select portrait. this cause problem on most dotmatrix printers as t

  • Help fixing panoramic picture

    Hello, the above picture is taken in panoramic mode from Olympus TG-2. It's made up of three pictures each one having a little different exposure because of the sun angle. The camera automatically stitches the photos in the one JPEG Does anybody have

  • Choice of software component in certification exam

    Hello everyone, I have just completed the SAP MM Solution Academy and am planning to take the ceritication exam this month. I was wondering if choosing the software component (R/3, ECC 5.0, ECC 6.0) has any effect in the exam. Thanks and regards, Hal

  • Time Machine trouble, tried everything !

    Hi, I have a Mac OSc Version 10.7.5, with 2.5 Ghz Intel Core i5, with a hard drive that is 500 GB, i"ve used 180.73 and have 318.52 free space.  I'm trying to do a backup using Time Machine using a 3TB, Seagate Desktop External Hard Drive USB 3.0.  I

  • Importing Audiobooks

    I imported two audiobooks, but they show up as songs and they don't come in order on my iPod. How can I put them as an audiobook in iTunes, if at all?