Home » Developer & Programmer » Reports & Discoverer » 0 instead of null column based on 2-queries (CM merged 2)
0 instead of null column based on 2-queries (CM merged 2) [message #613503] Wed, 07 May 2014 09:48 Go to next message
shahzad-ul-hasan
Messages: 615
Registered: August 2002
Senior Member
I want to display data based on 2-queries as shown in the figure. Require is display 0 in the abasent column. if the class is not matched.
/forum/fa/11864/0/
Re: 0 instead of null column based on 2-queries [message #613536 is a reply to message #613503] Wed, 07 May 2014 13:45 Go to previous messageGo to next message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I'm afraid I can't suggest much (but to use NVL if you currently display NULL but would like to display 0 instead) as I don't understand the question. What "two queries" (I can't see either of them)? Perhaps you should compose a test case so that we'd have INPUT. Present code you've written so far, explain desired OUTPUT. I believe someone will assist.
Re: 0 instead of null column based on 2-queries [message #613559 is a reply to message #613536] Wed, 07 May 2014 22:45 Go to previous messageGo to next message
shahzad-ul-hasan
Messages: 615
Registered: August 2002
Senior Member
Please see attached file../forum/fa/11865/0/
Query-1
SELECT distinct count(STUDENT.STUID), STUDENT.CLASS||' (' || STUDENT.SECTION || ')' 
FROM STUDENT 
where status='PRESENT'
group by STUDENT.CLASS||' (' || STUDENT.SECTION || ')' 

Query-2
SELECT distinct
STUDENT.CLASS||' (' || STUDENT.SECTION || ')' , 
count(ABSENT1.ASTUID) aas
FROM ABSENT, ABSENT1, STUDENT
WHERE (ABSENT1.ABDATE = ABSENT.ABDATE) 
and student.stuid=absent1.astuid(+)
and status='PRESENT'
AND ABSENT.ABDATE=:P_1
GROUP BY  
STUDENT.CLASS||' (' || STUDENT.SECTION || ')' 
Re: 0 instead of null column based on 2-queries [message #613561 is a reply to message #613559] Thu, 08 May 2014 00:02 Go to previous messageGo to next message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Why do you need 2 queries? The second one seems to be containing all information you need.

Just in case you didn't understand what I previously said: "test case" means that you should provide CREATE TABLE statements for these 3 tables, as well as INSERT INTO statements so that we'd have some data to work with. Then explain the result you expect from such an input data set.
Re: 0 instead of null column based on 2-queries [message #613610 is a reply to message #613561] Thu, 08 May 2014 08:48 Go to previous messageGo to next message
shahzad-ul-hasan
Messages: 615
Registered: August 2002
Senior Member
create table student (
stuid number(6) primary key,status varchar2(20),class varchar2(30),section varchar2(30));

create table absent (
abdate date primary key);

create table absent1 (
abdate date references absent(abdate),astuid number(6),aremarks varchar2(30));

Data:
Student:
1 PRESENT PREP A
2 PRESENT NURSERY A
3 PRESENT PREP A
4 PRESENT ONE A
5 PRESENT TWO A
6 PRESENT ONE A
7 PRESENT TWO A
8 PRESENT NURSERY A
9 PRESENT NURSERY A
10 PRESENT TWO A
-----------------------------------------------------
master Detail: Abdate: 23-Mar-2014
Astuid Aremarks
1 Absent
2 Absent
5 Absent
6 Absent
Abdate: 28-Mar-2014
2 Absent
5 Absent
----------------------------------------------------------------------------\
OUTPUT
/forum/fa/11866/0/
Re: 0 instead of null column based on 2-queries [message #613611 is a reply to message #613559] Thu, 08 May 2014 08:52 Go to previous messageGo to next message
Lalit Kumar B
Messages: 3174
Registered: May 2013
Location: World Wide on the Web
Senior Member
COUNT returns NULL when you group the rows using GROUP BY clause. If you remove the group by clause then count will return zero instead of no records(NULL).

The reason for this is :
  • Without a group by clause, row aggregation happens for all the rows satisfying the where clause.
  • When you apply group by, first the filter is applied, then the rows are grouped and then the count is applied. So, for a group which do not satisfy the filter condition, what is there to count at all? Hence, nothing to return or say NULL.

In your case, if you cannot remove group by, then as LF suggested, use NVL.

Hope that helps!

[Updated on: Thu, 08 May 2014 08:53]

Report message to a moderator

Re: 0 instead of null column based on 2-queries [message #613615 is a reply to message #613611] Thu, 08 May 2014 08:59 Go to previous messageGo to next message
shahzad-ul-hasan
Messages: 615
Registered: August 2002
Senior Member
but i need to fix class (character). how i can overcome this charcater instead of NVL.
Re: 0 instead of null column based on 2-queries [message #613617 is a reply to message #613615] Thu, 08 May 2014 09:06 Go to previous messageGo to next message
Lalit Kumar B
Messages: 3174
Registered: May 2013
Location: World Wide on the Web
Senior Member
Sorry I couldn't understand you. What character are you talking about?
Re: 0 instead of null column based on 2-queries [message #613623 is a reply to message #613617] Thu, 08 May 2014 09:21 Go to previous messageGo to next message
cookiemonster
Messages: 13917
Registered: September 2008
Location: Rainy Manchester
Senior Member
Something like this:

SELECT STUDENT.CLASS||' (' || STUDENT.SECTION || ')' , COUNT(STUDENT.STUID),
count(ABSENT1.ASTUID) aas
FROM ABSENT1, STUDENT
WHERE (ABSENT1.ABDATE = ABSENT.ABDATE) 
and student.stuid=absent1.astuid(+)
and status='PRESENT'
AND ABSENT1.ABDATE(+)=:P_1
GROUP BY  
STUDENT.CLASS||' (' || STUDENT.SECTION || ')' 

You don't need two queries. You don't need to join to the absent table, it does nothing useful.
You just need to outer join absent1 to student and count data from each table.
If there are no matching absent1 records the count will be 0.
Re: 0 instead of null column based on 2-queries [message #613626 is a reply to message #613611] Thu, 08 May 2014 09:43 Go to previous messageGo to next message
cookiemonster
Messages: 13917
Registered: September 2008
Location: Rainy Manchester
Senior Member
Lalit Kumar B wrote on Thu, 08 May 2014 14:52
COUNT returns NULL when you group the rows using GROUP BY clause. If you remove the group by clause then count will return zero instead of no records(NULL).

Don't confuse NULL and no rows, they are not equivalent. Count never returns null. The other aggregates will return null if there are no matching rows.
OP isn't getting null at any point, he's getting no rows for his 2nd query for certain rows from the 1st and nvl will do nothing to fix that.
Re: 0 instead of null column based on 2-queries [message #613627 is a reply to message #613626] Thu, 08 May 2014 10:12 Go to previous messageGo to next message
Lalit Kumar B
Messages: 3174
Registered: May 2013
Location: World Wide on the Web
Senior Member
Thanks CM for explaining it further. Yes my statement became vague when I said no records and null together. My explanation holds good to differentiate the case between count returning zero or no records.

Thanks again.
Re: 0 instead of null column based on 2-queries [message #615697 is a reply to message #613627] Sat, 07 June 2014 06:00 Go to previous messageGo to next message
shahzad-ul-hasan
Messages: 615
Registered: August 2002
Senior Member
have anybody got this soultion...
please advised.
Re: 0 instead of null column based on 2-queries [message #615698 is a reply to message #615697] Sat, 07 June 2014 07:20 Go to previous messageGo to next message
Lalit Kumar B
Messages: 3174
Registered: May 2013
Location: World Wide on the Web
Senior Member
Did you try the query suggested by CM? As of your tables provided, not all are required.
Re: 0 instead of null column based on 2-queries [message #615702 is a reply to message #615698] Sat, 07 June 2014 09:31 Go to previous messageGo to next message
shahzad-ul-hasan
Messages: 615
Registered: August 2002
Senior Member
yes but it gives me that../forum/fa/11925/0/
Re: 0 instead of null column based on 2-queries [message #615703 is a reply to message #615702] Sat, 07 June 2014 09:36 Go to previous messageGo to next message
shahzad-ul-hasan
Messages: 615
Registered: August 2002
Senior Member
create table absent (abdate date not null);

create table absent1 (abdate date references absent(abdate),astuid number(6),arem varchar2(30));

create table student (stuid number(6) primary key,status varchar2(30),name varchar2(90),f_name varchar2(90),class varchar2(20),section varchar2(30))


if all student of one class are present on that particular day. this class will be shown and count(absent) will be 0.
Re: 0 instead of null column based on 2-queries [message #615706 is a reply to message #615703] Sat, 07 June 2014 12:01 Go to previous messageGo to next message
Lalit Kumar B
Messages: 3174
Registered: May 2013
Location: World Wide on the Web
Senior Member
So you want the output as shown in your first post? Just that for case when absent you need 0.

Please post the insert statements for the tables.
Re: 0 instead of null column based on 2-queries [message #615751 is a reply to message #615706] Sun, 08 June 2014 21:48 Go to previous messageGo to next message
shahzad-ul-hasan
Messages: 615
Registered: August 2002
Senior Member
SQL> insert into student (stuid,status,name,f_name,class,section)
values
(1,'PRESENT','ASLAM','NOOR','FIVE','PINK');
insert into student (stuid,status,name,f_name,class,section)
values
(2,'PRESENT','ALAM','NAZIR','FIVE','PINK');
insert into student (stuid,status,name,f_name,class,section)
values
(3,'PRESENT','AM','NR','FIVE','PINK');
insert into student (stuid,status,name,f_name,class,section)
values
(4,'PRESENT','A','N','FIVE','PINK');
Insert into student (stuid,status,name,f_name,class,section)
values
(5,'PRESENT','ASL','NO','FOUR','WHITE');
Insert into student (stuid,status,name,f_name,class,section)
values
(6,'PRESENT','AA','N','FOUR','WHITE');
Insert into student (stuid,status,name,f_name,class,section)
values
(7,'PRESENT','AAA','AAO','FOUR','WHITE');
Insert into student (stuid,status,name,f_name,class,section)
values
(8,'PRESENT','ASA','52OR','SIX','BLUE');
-------------------------------------------------------------------
INSER INTO ABSENT (ABDATE) VALUES ('13-MAY-2014');
INSER INTO ABSENT (ABDATE) VALUES ('14-MAY-2014');
INSER INTO ABSENT (ABDATE) VALUES ('15-MAY-2014');
--------------------------------------------------------------------
INSERT INTO ABSENT1 (abdate,astuid,arem)
VALUES
('13-MAY-2014',1,'ABSENT');
INSERT INTO ABSENT1 (abdate,astuid,arem)
VALUES
('13-MAY-2014',3,'ABSENT');
INSERT INTO ABSENT1 (abdate,astuid,arem)
VALUES
('13-MAY-2014',4,'ABSENT');
INSERT INTO ABSENT1 (abdate,astuid,arem)
VALUES
('14-MAY-2014',6,'ABSENT');
INSERT INTO ABSENT1 (abdate,astuid,arem)
VALUES
('14-MAY-2014',7,'ABSENT');
INSERT INTO ABSENT1 (abdate,astuid,arem)
VALUES
('15-MAY-2014',8,'ABSENT');
INSERT INTO ABSENT1 (abdate,astuid,arem)
VALUES
('15-MAY-2014',5,'ABSENT');

--------------------------------------------------------------
pLEASE ADVISED. TRYING TO INCREASE CLASSES AND SECTION FOR MORE VAREITY.


[Updated on: Sun, 08 June 2014 21:50]

Report message to a moderator

Re: 0 instead of null column based on 2-queries [message #615764 is a reply to message #615703] Mon, 09 June 2014 02:30 Go to previous messageGo to next message
Lalit Kumar B
Messages: 3174
Registered: May 2013
Location: World Wide on the Web
Senior Member
shahzad-ul-hasan wrote on Sat, 07 June 2014 20:06
create table absent (abdate date not null);

create table absent1 (abdate date references absent(abdate),astuid number(6),arem varchar2(30));


How can abdate in absent1 table reference abdate in absent table when you have not mentioned abdate to be the primary key? Correct the DDL.
Re: 0 instead of null column based on 2-queries [message #615765 is a reply to message #615751] Mon, 09 June 2014 02:32 Go to previous messageGo to next message
Lalit Kumar B
Messages: 3174
Registered: May 2013
Location: World Wide on the Web
Senior Member
shahzad-ul-hasan wrote on Mon, 09 June 2014 08:18
INSER INTO ABSENT (ABDATE) VALUES ('13-MAY-2014');
INSER INTO ABSENT (ABDATE) VALUES ('14-MAY-2014');
INSER INTO ABSENT (ABDATE) VALUES ('15-MAY-2014');


Did you even execute the statements before posting? INSERT has a "T" missing. Also, always remember to provide the proper date format using to_date for date values.
Re: 0 instead of null column based on 2-queries [message #615771 is a reply to message #615702] Mon, 09 June 2014 02:59 Go to previous messageGo to next message
cookiemonster
Messages: 13917
Registered: September 2008
Location: Rainy Manchester
Senior Member
shahzad-ul-hasan wrote on Sat, 07 June 2014 15:31
yes but it gives me that..


The query I suggested can not give that output. So what query did you actually use?
Re: 0 instead of null column based on 2-queries [message #615774 is a reply to message #615771] Mon, 09 June 2014 03:27 Go to previous messageGo to next message
cookiemonster
Messages: 13917
Registered: September 2008
Location: Rainy Manchester
Senior Member
Looking at the output it looks like you're still using two queries. As I said before you only need one to get both counts.
Re: 0 instead of null column based on 2-queries [message #615784 is a reply to message #615771] Mon, 09 June 2014 04:16 Go to previous messageGo to next message
shahzad-ul-hasan
Messages: 615
Registered: August 2002
Senior Member
SELECT STUDENT.CLASS||' (' || STUDENT.SECTION || ')' , COUNT(STUDENT.STUID),
count(ABSENT1.ASTUID) aas
FROM ABSENT1, STUDENT
WHERE (ABSENT1.ABDATE = ABSENT.ABDATE) 
and student.stuid=absent1.astuid(+)
and status='PRESENT'
AND ABSENT1.ABDATE(+)=:P_1
GROUP BY  
STUDENT.CLASS||' (' || STUDENT.SECTION || ')' 
Re: 0 instead of null column based on 2-queries [message #615788 is a reply to message #615784] Mon, 09 June 2014 04:34 Go to previous messageGo to next message
cookiemonster
Messages: 13917
Registered: September 2008
Location: Rainy Manchester
Senior Member
That query gives one row per "STUDENT.CLASS||' (' || STUDENT.SECTION || ')'" with a count for strength and a count for absent.
This would give the output you say you want.
It will not give the output in the last image you posted as that has one record for the strength for each group and one record for the absent for each group.
So what exactly did you do in the report to get the output in your last image? Did you use two queries?
Re: 0 instead of null column based on 2-queries [message #615790 is a reply to message #615788] Mon, 09 June 2014 04:50 Go to previous messageGo to next message
shahzad-ul-hasan
Messages: 615
Registered: August 2002
Senior Member
Yes i want this result.
Quote:
This would give the output you say you want.
one row per "STUDENT.CLASS||' (' || STUDENT.SECTION || ')'" with a count for strength and a count for absent.
Re: 0 instead of null column based on 2-queries [message #615792 is a reply to message #615790] Mon, 09 June 2014 04:59 Go to previous messageGo to next message
cookiemonster
Messages: 13917
Registered: September 2008
Location: Rainy Manchester
Senior Member
And that query obviously gives that result. I don't know what you've done in the report, but all you need is that query, no others, and a layout based on it with a single group.
Re: 0 instead of null column based on 2-queries [message #617150 is a reply to message #615792] Wed, 25 June 2014 08:40 Go to previous messageGo to next message
shahzad-ul-hasan
Messages: 615
Registered: August 2002
Senior Member
please check that output./forum/fa/11983/0/
SELECT STUDENT.CLASS||' (' || STUDENT.SECTION || ')' , COUNT(STUDENT.STUID),
count(ABSENT1.ASTUID) aas
FROM ABSENT1, STUDENT,absent
WHERE (ABSENT1.ABDATE = ABSENT.ABDATE)
and student.stuid=absent1.astuid
and status='PRESENT'
AND ABSENT1.ABDATE(+)='23-May-2014'
GROUP BY
STUDENT.CLASS||' (' || STUDENT.SECTION || ')'
Re: 0 instead of null column based on 2-queries [message #617153 is a reply to message #617150] Wed, 25 June 2014 09:14 Go to previous messageGo to next message
cookiemonster
Messages: 13917
Registered: September 2008
Location: Rainy Manchester
Senior Member
Couple of points:
1) It would have been better to copy and paste the text from sqlplus and post it here in code tags, rather than use an image.
2) My example code has two (+), yours only has 1 so the outer join isn't an outer join any more, instead it's an inner join. Add the missing (+)
3) As I said above you don't need the absent table, it does nothing useful (and yes I know theres a reference to it in my example, I left it there by mistake).
Re: 0 instead of null column based on 2-queries [message #617161 is a reply to message #617153] Wed, 25 June 2014 10:41 Go to previous messageGo to next message
shahzad-ul-hasan
Messages: 615
Registered: August 2002
Senior Member
Thanx sir. it works.....
table With OuterJoine [message #617318 is a reply to message #613503] Fri, 27 June 2014 06:35 Go to previous messageGo to next message
shahzad-ul-hasan
Messages: 615
Registered: August 2002
Senior Member
I have a table with Structure..
 SQL> desc absent1
 Name                                      Null?    Type
 ----------------------------------------- -------- -----------------------
 ABDATE                                             DATE
 ASTUID                                             NUMBER(9)
 ABTYPE                                             VARCHAR2(45)

Insert into absent1 (abdate,astuid,abtype)
values
('20-APR-2014',12,'ABSENT');
Insert into absent1 (abdate,astuid,abtype)
values
('20-APR-2014',16,'ABSENT');
Insert into absent1 (abdate,astuid,abtype)
values
('20-APR-2014',10,'LEAVE');
Insert into absent1 (abdate,astuid,abtype)
values
('20-APR-2014',42,'LEAVE');


One table snd output Should Be in Absent AND Leave Column.../forum/fa/11991/0/
Re: table With OuterJoine [message #617321 is a reply to message #617318] Fri, 27 June 2014 06:46 Go to previous messageGo to next message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Man, you've been using this forum for 12 years now. Apparently, you are using Oracle that long as well. I'm amazed by finding out that
  • you don't know how to properly ask a question (where do these Nursery things come from? Another table? Which one? What is strength?
  • you don't know how to write a query which uses outer join (at least, that's what topic title suggests)
Re: table With OuterJoine [message #617322 is a reply to message #617321] Fri, 27 June 2014 06:53 Go to previous messageGo to next message
shahzad-ul-hasan
Messages: 615
Registered: August 2002
Senior Member
Sir noted. i want to break the above table into absent and leave. please advised.
Re: table With OuterJoine [message #617323 is a reply to message #617322] Fri, 27 June 2014 07:01 Go to previous messageGo to next message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Maybe you noticed what I said, but in vain. I still have no idea what you are asking.

Which table do you call "the above table"? The one you provided CREATE TABLE statement for, or the one presented by a screenshot? Whichever it is, additional information is required (but you don't want to provide it).
Re: table With OuterJoine [message #617326 is a reply to message #617323] Fri, 27 June 2014 07:30 Go to previous messageGo to next message
cookiemonster
Messages: 13917
Registered: September 2008
Location: Rainy Manchester
Senior Member
The question makes a lot more sense if you tack it onto the existing one, since it appears to be a variation of the above problem with an extra column.
So I've merged the two topics.
Count counts not null instances of an expression. So you use a case statement to give a not null thing to count:
count(CASE WHEN absent1.abtype = 'LEAVE' THEN ABSENT1.ASTUID END) as leave

Re: table With OuterJoine [message #617331 is a reply to message #617326] Fri, 27 June 2014 09:00 Go to previous messageGo to next message
shahzad-ul-hasan
Messages: 615
Registered: August 2002
Senior Member
THX FOR YOUR NICE HELP. ITS WORKING....
Re: table With OuterJoine [message #617387 is a reply to message #617326] Sat, 28 June 2014 08:42 Go to previous messageGo to next message
shahzad-ul-hasan
Messages: 615
Registered: August 2002
Senior Member
Dear Sir,
i am making a matrix with group report.i am using your query with some amendments.please review.
SELECT  STUDENT.CLASS|| '  ' || 
STUDENT.SECTION ss, STUDENT.NAME,student.stuid, count(astuid),substr(last_day(max(abdate)),1,2) aa,substr(last_day(abdate),4,3) aa1
FROM ABSENT1, STUDENT 
where status='PRESENT'
and absent1.astuid(+)=student.stuid
group by 
STUDENT.CLASS|| '  ' || 
STUDENT.SECTION, STUDENT.NAME, student.STUID,substr(last_day(abdate),4,3)
order by substr(last_day(max(abdate)),1,2) 

Advisory No -1 (required): i want to arrange the Months in that format:
April - May - Jun (But it is showing Apr- Jun- May)
Advisory No -2 (required): the null columns not showing 0 instead of null values.Please see the attached file.
Please advised.

/forum/fa/11992/0/

[Updated on: Sat, 28 June 2014 08:43]

Report message to a moderator

Re: table With OuterJoine [message #617390 is a reply to message #617387] Sat, 28 June 2014 10:24 Go to previous messageGo to next message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
No. 1: which clause is responsible for ordering result set?
No. 2: which function replaces NULL to something else?
Re: table With OuterJoine [message #617393 is a reply to message #617390] Sun, 29 June 2014 00:53 Go to previous messageGo to next message
shahzad-ul-hasan
Messages: 615
Registered: August 2002
Senior Member
Order by clause....
Abdate contains (01-May-2014,02-May-2014,05-May-2014,14-May-2014,20-May-2014,01-Jun-2014,04-Jun-2014,06-Jun-2014)
i want to arrange them in May, June instead of Jun, May....

The students(Astuid) which is not present in Absent1 table showing 0 instead of null;
Re: table With OuterJoine [message #617396 is a reply to message #617393] Sun, 29 June 2014 01:49 Go to previous messageGo to next message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Yes, ORDER BY is what I was thinking about. Use TO_CHAR with the appropriate month format mask so that you'd get month numbers (5 for May, 6 for June etc.). Then use such an expression in the ORDER BY.

As of 0 values: create a text boilerplate object inside the cell - it will be a number 0. Then create its format trigger which will return FALSE if cell value exists (so - don't display 0); otherwise, return TRUE (i.e. display it).
Re: table With OuterJoine [message #617405 is a reply to message #617396] Sun, 29 June 2014 06:21 Go to previous messageGo to next message
shahzad-ul-hasan
Messages: 615
Registered: August 2002
Senior Member
SELECT  STUDENT.CLASS|| '  ' || 
STUDENT.SECTION ss, STUDENT.NAME,student.stuid, count(astuid),to_char(LAST_DAY(abdate),'MON') aa1,to_char(last_day(abdate),'DD') AA
FROM ABSENT1, STUDENT 
where status='PRESENT'
and absent1.astuid(+)=student.stuid
group by 
STUDENT.CLASS|| '  ' || 
STUDENT.SECTION, STUDENT.NAME, student.STUID,to_char(last_day(abdate),'MON'),to_char(last_day(abdate),'DD')

i have made the changes..THE RESULT IS SAME....
Re: table With OuterJoine [message #617406 is a reply to message #617405] Sun, 29 June 2014 06:40 Go to previous messageGo to previous message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Where did you make those changes? I'm not sure what you meant to say with the MON format mask, as it returns month name (not number, as I suggested). Moreover, you didn't specify ORDER BY? All I can see is GROUP BY (you can't expect Oracle to sort values based on GROUP BY - ORDER BY is obligatory).

SQL>   SELECT ename,
  2           hiredate,
  3           TO_CHAR (hiredate, 'mon') month_1,
  4           TO_CHAR (hiredate, 'mm') month_2
  5      FROM emp
  6     WHERE deptno = 20
  7  ORDER BY TO_CHAR (hiredate, 'mm');

ENAME      HIREDATE   MON MO
---------- ---------- --- --
ADAMS      12.01.1983 jan 01
JONES      02.04.1981 apr 04
FORD       03.12.1981 dec 12
SMITH      17.12.1980 dec 12
SCOTT      09.12.1982 dec 12

SQL>


Besides, check what is Break Order for month field property set to. If necessary, modify it to "Ascending".
Previous Topic: Report engine crashed
Next Topic: how to use param's in reports
Goto Forum:
  


Current Time: Thu Mar 28 14:31:16 CDT 2024