Home » Developer & Programmer » Reports & Discoverer » Getting Sum of Student gender wise...
Getting Sum of Student gender wise... [message #602300] Mon, 02 December 2013 21:43 Go to next message
shahzad-ul-hasan
Messages: 561
Registered: August 2002
Senior Member
Main Query:
SELECT count(STUDENT.STUID), STUDENT.CLASS, STUDENT.GENDER
FROM STUDENT
where student.status='PRESENT'
group by gender,class
..................................................................
/forum/fa/11342/0/
In this picture male has two groups.i want to merge into one male group. report type is matrix.. please advised..
  • Attachment: 123.JPG
    (Size: 37.85KB, Downloaded 591 times)
Re: Getting Sum of Student gender wise... [message #602311 is a reply to message #602300] Tue, 03 December 2013 01:03 Go to previous messageGo to next message
Littlefoot
Messages: 21510
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Why do you have two MALEs? What does your query return while executed in SQL*Plus? Two MALEs as well? Maybe one of them isn't really "MALE" but "MALE_" (_ representing a space character) (or similar). Fix that, and report will look allright.
Re: Getting Sum of Student gender wise... [message #602317 is a reply to message #602311] Tue, 03 December 2013 03:06 Go to previous messageGo to next message
shahzad-ul-hasan
Messages: 561
Registered: August 2002
Senior Member
/forum/fa/11346/0/
please advised..
how i can remove this thing as shown in figure. i have useed replace function but it could do anything..
/forum/fa/11348/0/
  • Attachment: untitled.JPG
    (Size: 37.70KB, Downloaded 374 times)

[Updated on: Tue, 03 December 2013 03:32]

Report message to a moderator

Re: Getting Sum of Student gender wise... [message #602332 is a reply to message #602317] Tue, 03 December 2013 04:23 Go to previous messageGo to next message
Littlefoot
Messages: 21510
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Find out which character it is (with the DUMP function); then RTRIM it off.
SQL> with test as
  2    (select 'malex' gender from dual)
  3  select dump(gender),
  4         rtrim(gender, chr(120)) result
  5  from test;

DUMP(GENDER)                     RESU
-------------------------------- ----
Typ=96 Len=5: 109,97,108,101,120 male

SQL>
Re: Getting Sum of Student gender wise... [message #602342 is a reply to message #602332] Tue, 03 December 2013 04:35 Go to previous messageGo to next message
shahzad-ul-hasan
Messages: 561
Registered: August 2002
Senior Member
this query work fine in SQL * Plus but not in reports...i have used it but how i can commit this change. when i type commit command it gives 0 row updated.
Re: Getting Sum of Student gender wise... [message #602344 is a reply to message #602342] Tue, 03 December 2013 04:39 Go to previous messageGo to next message
Littlefoot
Messages: 21510
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I don't know which query is "this query".

Besides, consider creating a check constraint on the GENDER column so that only MALE and FEMALE (or any other sex you want to allow) can be entered into that column.
Re: Getting Sum of Student gender wise... [message #602345 is a reply to message #602342] Tue, 03 December 2013 04:39 Go to previous message
shahzad-ul-hasan
Messages: 561
Registered: August 2002
Senior Member
thx Littlefoot i have got the soultion upon your guidence.
Previous Topic: Serial Number Field
Next Topic: Displaying 0 in cells with no values in a matrix report
Goto Forum:
  


Current Time: Mon Nov 18 16:03:18 CST 2019