query statistic from multi tables [message #604707] |
Fri, 03 January 2014 04:02 |
|
alhanashi
Messages: 7 Registered: December 2013
|
Junior Member |
|
|
Hi everyone
i want to make statistic in my form and display it in Schedule by group as location and Device Type
as the following picture
DB Table:
DEVICE_OWNER ( D_ID , LOC_ID )
DEVICE_DETAILS ( D_ID , M_ID ) - D_ID is Primer Key
MODELS ( M_ID , D_TYPE ) - M_ID is Primer Key
V_INSTITUTION ( ID, value ) - ID is Primer Key
* D_ID : Device ID
* Loc_id and ID : Institution ID
* M_ID : Device model ID
* D_Type: Device Type ID
i make this but how can make it in oracle form
Quote:select count(o.d_id) from dhsit.Device_details D, dhsit.Device_owner O, dhsit.Models M, dhsit.V_INSTITUTION I
where D.d_id = O.d_id
and D.m_id = M.m_id
and O.loc_id = I.id
order by O.d_id
Finally I want number of devices for each type, according to the institution
thanks to all
-
Attachment: Untitled.png
(Size: 4.72KB, Downloaded 1548 times)
[Updated on: Fri, 03 January 2014 04:20] Report message to a moderator
|
|
|
Re: query statistic from multi tables [message #604733 is a reply to message #604707] |
Fri, 03 January 2014 09:57 |
|
alhanashi
Messages: 7 Registered: December 2013
|
Junior Member |
|
|
hi again
i make view for the previous question
CREATE OR REPLACE VIEW STATS
(ID, L_ID, LOC, T_ID, TYPE)
AS
select all o.d_id ,o.loc_id, i.value ,m.d_type , t.value from dhsit.Device_details D, dhsit.Device_owner O, dhsit.Models M, dhsit.V_INSTITUTION I, dhsit.V_DEVICE_TYPE t
where O.d_id = d.d_id
and D.m_id = M.m_id
and O.loc_id = I.id
and t.id = m.d_type
order by O.d_id
/
now how i can make query in oracle form to display all data in group as i ask before
-
Attachment: ttt.png
(Size: 3.31KB, Downloaded 1525 times)
[Updated on: Fri, 03 January 2014 09:57] Report message to a moderator
|
|
|
Re: query statistic from multi tables [message #604745 is a reply to message #604733] |
Fri, 03 January 2014 12:41 |
|
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
Use Reports instead of Forms.
Forms can't do anything like "dynamic matrix layout" because number of columns must be known before you start creating a form (i.e. you can create a block which would display "Type 1, Type 2, Type 3" (3 columns), but if "Type 4" appears, Forms can't automatically add another column, so you'd have to modify the form.
Reports, on the other hand, does that easily. Therefore, switch to a more convenient tool.
|
|
|
|
Re: query statistic from multi tables [message #604848 is a reply to message #604827] |
Sat, 04 January 2014 11:53 |
|
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
If you use Oracle Forms, then you should know that Developer Suite contains Oracle Reports as well.
Jasper Reports is a different thing; it is an open source reporting tool which can access an Oracle database and display information stored within. I've created several reports using iReport so - obviously - I'm not an experienced Jasper Reports user, but from this very limited experience I can say that it is much more user-friendly than Oracle Reports.
Which Oracle Developer Suite do you use? Is it client-server or web based? Note that - in order to run a report on the web - you'll need an Oracle application server (running reports services). For Jasper Reports, you can use any free server (such as Apache Tomcat). If you already have a working Oracle environment, I suppose that it would be simpler to just stick to it. Otherwise, the choice is yours. Note that it is relatively simple to make Apache running, while it is a very complex task to make Oracle application server running.
[Updated on: Sat, 04 January 2014 11:54] Report message to a moderator
|
|
|