To obtain all the Month details
Hi
I need to develop a report based on the query where i need to obtain the details for all the month in a year.My problem is, if a particular month is not present then it should show the details with value as null and all the month should be displayed in order.
for instance if Jan,March details are present in the table then in the report it should display as
Jan 123 124 124
Feb 0 0 0
Mar 123 124 124
Apr 0 0 0
May 0 0 0
so on.
Please help me in finding the solution
thanks,
Rahul
Kuljeets query will not return rows if in a particular month there is no hiredate. You can combine the 2 solutions above in one query:
select nummon, charmon, nvl(sum(sal),0)
from emp,
(select '01' nummon ,'JAN' charmon from dual
union
select '02','FEB' from dual
union
select '03','MAR' from dual
union
select '04','APR' from dual
union
select '05','MAY' from dual
union
select '06','JUN' from dual
union
select '07','JUL' from dual
union
select '08','AUG' from dual
union
select '09','SEP' from dual
union
select '10','OCT' from dual
union
select '11','NOV' from dual
union
select '12','DEC' from dual )
where nummon = to_char(hiredate (+),'MM')
group by nummon, charmon
order by 1;
NU CHA NVL(SUM(SAL),0)
01 JAN 1300
02 FEB 2850
03 MAR 0
04 APR 5975
05 MAY 3950
06 JUN 2450
07 JUL 0
08 AUG 0
09 SEP 2750
10 OCT 0
11 NOV 5000
12 DEC 4850
12 rows selected.The first column is only used for sorting.
Similar Messages
-
Query should fetch all the query details in the system.
Hi All
We are looking for a query which will fetch all the query details in the system along with the user names either who has created the query or who has run it atleast once.
If any of the queries are not used for a long time then we can delete it with the user's/owner's approval.
Is there anyway we can desing such query .
Thanks
AsimHi,
Thanks for the reply.
My requirement is that we want to create a new query which should fetch the details information of already existing queries.
Like who has created that query, how frequently the use it etc...
Whenever we run the new query it should give information of all other existing queries.
Thanks and Regards
Asim -
Function to get all the months name of a year from dual
HI GURUS
Is there any function to get all the months name of a year from dual
thanks in advanceWhat about this --
satyaki>
satyaki>select months_name
2 from (
3 select to_char(add_months(trunc(sysdate,'YEAR'),rownum-1),'MONTH') months_name
4 from dual
5 connect by rownum<=12
6 );
MONTHS_NAME
JANUARY
FEBRUARY
MARCH
APRIL
MAY
JUNE
JULY
AUGUST
SEPTEMBER
OCTOBER
NOVEMBER
MONTHS_NAME
DECEMBER
12 rows selected.
satyaki>Regards.
Satyaki De. -
Can match identify my vinyl imported albums in I tunes. Also for it to work will I need to load all the album details. Obviously the iTunes Store needs to have the albums on line
Yes. Matching Songs in Vinyl Albums is possible, usually though with a success rate of 20 - 40%.
Even with great care taken to improve the quality of the recording, the outcome is mixed.
Summary points are here: https://discussions.apple.com/thread/3696878 -
how can I remove all the backup details that I have taken using rman nocatalog .
I want to delete all the backup details from the control file and from the physical location where the backups have been stored.
My oracle version is 10.2.0 on solaris 10.Use "list backup" command to first identify which backups you want to delete.
Once identified and you are sure go ahead and use DELETE command as describe din above post.
There is another way also. If you are sure about the physical location of the backups you need to delete. Just delete them from the physical location using OS commands and then use the CROSSCHECK command in RMAN. This will remove those backups from the CONTROLFILE also.
If its production, think twice before deleting anything. Do test your operations on a test database to make sure they will work as expected. -
To get last date of all the month in between year 2000 to 2100
Hi all
how we can make view that list last date of all the month in between year 2000 and 2100
Thanks & regards
vivekYou would use the LAST_DAY() function:
WITH months AS
SELECT TO_DATE('01/01/2000','MM/DD/YYYY') AS dt1
, TO_DATE('12/31/2100','MM/DD/YYYY') AS dt2
FROM DUAL
SELECT LAST_DAY(ADD_MONTHS(dt1,level-1)) LST_DAY_MONTHS
FROM months
CONNECT BY LEVEL <= MONTHS_BETWEEN(dt2,dt1)+1Sample of results (too many to post):
LST_DAY_MONTHS
01/31/2000 00:00:00
02/29/2000 00:00:00
03/31/2000 00:00:00
04/30/2000 00:00:00
05/31/2000 00:00:00
06/30/2000 00:00:00
07/31/2000 00:00:00
08/31/2000 00:00:00
09/30/2000 00:00:00
10/31/2000 00:00:00
11/30/2000 00:00:00
12/31/2000 00:00:00
01/31/2001 00:00:00
02/28/2001 00:00:00
03/31/2001 00:00:00
04/30/2001 00:00:00
05/31/2001 00:00:00
06/30/2001 00:00:00
07/31/2001 00:00:00
08/31/2001 00:00:00
09/30/2001 00:00:00
10/31/2001 00:00:00
11/30/2001 00:00:00
12/31/2001 00:00:00
01/31/2002 00:00:00
02/28/2002 00:00:00
03/31/2002 00:00:00 -
Create a table with all the months between two dates
Hi all,
I have a purchase table recording individual purchases. One of the fields is my Date field (date of purchase).
I would like to create a table 'All_months' with two entries ('month_no' and 'month') which will be based on the first and last date in the purchase table. Assuming the first purchase recorded in my purchase table was on the 12th of January 2008, the table should have the following structure:
month_no month
1 12JAN2008
2 12FEB2008
3 12MAR2008
It should continue in this fashion up-to the month where the last purchase was recorded.
I have been struggling with creating the query that would do that for days now and can't find anything when asking Mr Google.
Thanks,
ChrisWelcome to the forum!
Here's one way:
CREATE TABLE all_months
AS
SELECT LEVEL AS month_no
, ADD_MONTHS ( first_date
, LEVEL - 1
) AS month
FROM (
SELECT MIN (date_of_purchace) AS first_date
, MAX (date_of_putchase) AS last_date
FROM purchase
CONNECT BY LEVEL <= 1 + MONTHS_BETWEEN ( TRUNC (last_date, 'MONTH')
, TRUNC (first_date, 'MONTH')
;Do you really need a table like this? Every time you change the data in the purchase table, you won't know if all_months is still accurate or not. You can derive all_months in a sub-query every time you need it, or make all_months a view instead of a table.
Edited by: Frank Kulash on Jun 14, 2012 5:57 AM -
My iphone4 is not starting even after completing all the billing details?why?
Hie,i have filled all the details including billing info n all then why cant i get I
started with my iphone4?Welcome to the user to User Technical Support Forum provided by Apple.
SANANADEEM wrote:
why cant i get I started with my iphone4?
What do you mean?
iPhone Basics > http://support.apple.com/basics/iphone -
If i buy an app do i have to pay for it all the months or just once?
If i buy a game that costs 2.99 do i have to pay that amount all rhe months or just once?
Only once for the app.
-
All the employee details also who left the company
Hi
I want to make a query for selecting employee's organization unit, for purpose I have gone through all
pa0001 table but it has so many rows regarding one employee. I needed get all employee organization unit including if the employee left the company also.
I have done a query like
select * from pa0001
where pa0001~endda gt sy-datum.
but I think It will not take the employee who left the company.
Regards
SebastianYes your question is true.
To solve this give following condition.
select * from pa0000
where pa0001~endda <= sy-datum.
if pa0000[] is not initial .
select * from pa0001
for all entries in pa0000
where pernr = pa0000-pernr
and endda = pa0000-endda.
endif.
And as far as you want data for all the employees in employee master with there organization unit.
-- That you can get it from PA0001 so it will solve your query ..
Give good points -
Any Report to find out all the jobs details in the system??
Hi,
My query: Is there any Report where I can get all the background jobs scheduled in a system with client info, frequency, program name, variant name and execution user. I know these information is stored in various tables but I want to get a consolidated view through a Report.
Thanks,
JavedYou can see them in SM37 of course but tables TBTCO and TBTCP cointain the info you're looking for
Regards
Juan -
My two line graphs covers six months, but only shows three months How can I make it show all six months
select the chart, then open the Chart Formatter:
Then click "Axis", then "Category (X)"
Change the "Label Angle" to "Left Vertical" or "Right Vertical" -
How can i get the rest of the jampack loops?? i would love to have all of them, price or cost is not a problem..
Ty\\theAPPLEguy? wrote:
How can i get the rest of the jampack loops??
you can find links to them here:
http://www.bulletsandbones.com/GB/PluginsApplesJamPacks.html -
Loosing patience :
I've tried for 2months to switch over to my new 4s, but every time I enter my apple ID to retrieve backup from icloud. I'm informed no back up available.
Given tried for 2months, I'm tempted to bin it and get an alternative phone.As you backup the iPhone in iTunes, it overwrites the last backup. Files are kept as they are changed, so that would explain how you get different dates in your backup folder. The only backups that are saved and not overwritten are the ones done just prior to a restore. You do have the option to go back in time on a Windows computer, however depending on the last time you set a restore point in Windows, it could be back further than you are willing to go.
-
Could you please let me know about the above as i need to transfer files urgently. Have tried to resend again but to no avail.
Hi stephena,
I have checked your account; there are no recent orders under the email address that you use here in the forums. So, I'm wondering if you may have signed up using a different email address, or signed up for a subscription via a Reader mobile app? For the latter, those subscriptions are handled by the app store from which you made the purchase, so Adobe wouldn't have record of those.
Best,
Sara
Maybe you are looking for
-
Right way to build / use quad tree?
Hi, the quadtree data stucture seems so simple, and fits alot of problems, but coding it properly is a problem. The purpose of the tree is to find which objects are with in a visible area. So each node has dimensions x,y,width, height. And child a,b,
-
Modified idoc values are not reflecting in the IDOC display (ie we02)
Hello Team I wrote one inbound interface for posting GR by using the IDOC MBGMCR03. In the inbound FM, i wrote some code for retrieving some data and mapping to its relevant fields of the segments. It is working fine but when i see the idoc values in
-
Photos keeps importing "Already Imported" photos
The new Photos app [Version 1.0 (209.52.0)] keep recognising a few photos from my phone as 'New' even though it has already been imported (about 20 out of my 3000+ photos). This also happens when importing photos from folders; it keeps identifying a
-
Exporting OMF: Preserve Audio Levels?
Hi everyone, I have an OMF question that I can't find an answer for. I apologize if this question is more fitting in a ProTools Forum. I have exported an OMF from FCP v.5. Upon opening it in Pro Tools LE 7.3.1, I have discovered that none of the leve
-
What apps to use instant of words
What apps to use instant of words