to report... 15000 lines but only a few in dataset, which hurts

Im doing a report, there are 15000 completely lines which im trying to get the data for each project.
Everything works great and ends, but there are only a few records in the dataset?
is it because there are most likely many fields are null and null if its does not display this project? I don't really know.


This is the query that I just finished.



select 
pm.project_number,
pm.proj_id,
pm.proj_title,
fm.num_of_folders,
dc.num_of_docs,
dc.doc_size,
pu.num_of_users,
pg.num_of_groups,
ra.rfi_attachment,
rf.rfi_wo_attachment,
ia.issue_attachment,
iss.issue_wo_attachment,
rl.redline,
cn.company_name

from 
project_master pm,
(SELECT
      COUNT(1) AS num_of_docs,
      TRUNC(SUM(doc_file_size)/1048576,3) doc_size,
      proj_id
    FROM
      document_master
      where doc_status='A'  GROUP BY
      proj_id)dc,
(select company_id,company_name from company_master)cn,
(select  
      proj_id,
      COUNT(1) AS num_of_folders 
    from doc_folder_master
      where status='A' group by proj_id
      order by proj_id) fm,
(select  
      proj_id,
      COUNT(1) AS num_of_groups
    from user_project_groups
       group by proj_id
      order by proj_id)pg,
(select  
      proj_id,
      COUNT(1) AS num_of_users
    from project_users
       group by proj_id
      order by proj_id)pu,
(select 
      proj_id,
      COUNT(1) as REDLINE 
    from document_master 
    where doc_id IN
        (select parent_file_id from DOCUMENT_REDLINE_MASTER)
    group by proj_id)rl,
(select proj_id,COUNT(1) as issue_attachment
from issue where issue_id IN (select parent_object_id from attachment_master)
group by proj_id)ia,
(select proj_id,COUNT(1) as issue_wo_attachment
from issue group by proj_id)iss,
(select proj_id,COUNT(1) as rfi_attachment
from rfi where rfi_id IN (select parent_object_id from attachment_master)
group by proj_id)ra,
(select proj_id,COUNT(1) as rfi_wo_attachment
from rfi group by proj_id)rf



where dc.proj_id=pm.proj_id
and cn.company_id=pm.company_id
and fm.proj_id=pm.proj_id
and pg.proj_id=pm.proj_id
and pu.proj_id=pm.proj_id
and rl.proj_id=pm.proj_id
and ia.proj_id=pm.proj_id
and iss.proj_id=pm.proj_id
and ra.proj_id=pm.proj_id
and rf.proj_id=pm.proj_id
Published by: Jay on March 21, 2011 09:41

Published by: Jay on March 21, 2011 09:42

You must join your project with other tables as an OUTER join.

The State must in the end be:

...
where dc.proj_id(+)=pm.proj_id
and cn.company_id(+)=pm.company_id
and fm.proj_id(+)=pm.proj_id
and pg.proj_id(+)=pm.proj_id
and pu.proj_id(+)=pm.proj_id
and rl.proj_id(+)=pm.proj_id
and ia.proj_id(+)=pm.proj_id
and iss.proj_id(+)=pm.proj_id
and ra.proj_id(+)=pm.proj_id
and rf.proj_id(+)=pm.proj_id

I hope I put the "(+)" on the right side of the equation. It's some time I wrote no ansi sql.

In ANSI SQL OUTER JOIN would be written like this

select
pm.project_number,
pm.proj_id,
pm.proj_title,
fm.num_of_folders,
dc.num_of_docs,
dc.doc_size,
...
from  project_master pm
LEFT JOIN (select COUNT(1) AS num_of_docs,
        TRUNC(SUM(doc_file_size)/1048576,3) doc_size,
        proj_id
       FROM document_master
      where doc_status='A'  GROUP BY
        proj_id) dc
ON dc.proj_id=pm.proj_id
LEFT JOIN (...) fm ON fm.proj_id=pm.proj_id
LEFT JOIN (...) pg ON pg.proj_id=pm.proj_id
...

Tags: Database

Similar Questions

  • D110A printer not print correctly. Printer says "printing" but only a few characters on the homepage

    D110A printer not print correctly. Printer says "printing" but only a few characters on the homepage

    Hi amjo_2005,

    How the printer is connected to the device?

    What device you are trying to print from?

    What program you are trying to print from?

  • Export finishes, but only a few KB file appears.

    Hello

    I'm new with Adobe thing, so maybe I will not give enough information.
    I'm having a problem with the export part, I finished a synchronization a film (it was in English, but I got the Hungarian synchronization)
    and when I export the thing, it starts successfully, after 2 hours, it's finished, but I have only a few KB file... and the film is nowhere.
    I have enough hard drive space bytheway.
    Why this is happening?

    The English film was in .mkv and I was Hungarian .mka synchronization, so I multiplex with

    mkvmerge GUI and I have a .mkv file, so I converted to .mp4 for Adobe could handle.

    Synchronization became .mp4 and video become too .mp4 as you can see from the photo below.

    Adobe timeline.png

    And I want to export with these settings:

    Adobe settings.png

    I would be very grateful for your responses.

    System Specs:


    CPU: AMD Bulldozer x 8 FX-8120 (3.1Ghz)

    RAM: Kingston HyperX 2x2gb 1866 Mhz

    VGA: Nvidia GeForce GT240 1 GB DDr3

    HDD: 370 ~ GB

    OS: Windows 8 Pro x 64

    Make sure that there is no gap in the video, not even 1 frame, I've seen this cause problems for export. Put the video black as filler if you wish.

    Remove punctuation from export file name, such as «!» Some of these characters are reserved for use by system and might cause problems.

    Sorry to say that your system specs are very low for what you're trying to do. Intel is better than AMD, and 8GB is the minimum RAM, you want to work with. A second dedicated hard drive should always be used for video content, not the C: drive.

    If you try to export a short segment, this work using export settings?

    Thank you

    Jeff Pulera

    Safe Harbor computers

  • I downloaded 10 + songs to iTunes using my MacBook Pro computer. I tried to synchronize the songs on my iPhone 6 s, but only a few songs really get on my iPhone. How can I get all downloaded music on my phone?

    IPhone 6 s. version number 9.3.4

    New MacBook Pro

    I have trouble downloading all the music from my MacBook Pro on my iPhone via iTunes.

    I tried to sync my iPhone but there is no change.

    danielle_6 wrote:

    New MacBook Pro

    • It is literally 'new' (out of the box)?
    • It runs OS X El Capitan?
    • It runs the latest version of iTunes (12.4.3)?
    • At your iPhone synced to another computer before this one?
    • If so, did you migrate from the old computer to your new MacBook Pro?
  • Why my screen doesn't have extremely small text on some Web sites, but only a few.

    on only two websites, (the ones I use most) the screen is reduced to a size that I can barely see

    Don't sites look bad or display differently they should

  • I can't save. Advance registration line but shows only a few peaks.

    I can't save. Advance registration line but shows only a few peaks.

    Hello

    1 did you do any change on the computer before this problem?
    2. which version of the Windows operating system is installed on your computer?

    If you are using Windows Vista I suggest you to consult the following Microsoft article.

    Troubleshoot audio recording : http://windows.microsoft.com/en-us/windows-vista/Troubleshoot-audio-recording-problems

    If you are using Windows 7 I suggest you to consult the following Microsoft article


    Open the troubleshooting of Audio recording open the troubleshooting of audio
    :http://windows.microsoft.com/en-US/windows7/Open-the-Recording-Audio-troubleshooter

    Also see the following Microsoft article:

    Record audio with Sound Recorder: http://windows.microsoft.com/en-US/windows7/Record-audio-with-Sound-Recorder

    Audio recording in sound recorder: frequently asked questions: http://windows.microsoft.com/en-US/windows7/Recording-audio-in-Sound-Recorder-frequently-asked-questions

    Record sound: http://windows.microsoft.com/en-US/windows-vista/Record-sound

  • I am looking to buy a 'new' ipod classic. IPod Superstore claims get the new Apple iPod that Apple is still making them for 5 years, but only to sell them to a few suppliers for resale. Is this possible?

    I am looking to buy a 'new' ipod classic. IPod Superstore claims get the new Apple iPod that Apple is still making them for 5 years, but only to sell them to a few suppliers for resale. Is this possible?

    Probably not still making them, but Apple political is to the service of produced at least five years after they is no longer manufactured and sold

    "Owners of iPhone, iPad, iPod or Mac products can get the services and Apple parts or service providers from Apple for 5 years after that the product is longer manufactured,' which is

    Vintage and obsolete products - Apple Support

    With the iPod, 'maintenance' means often giving you a replacement to pay the off-guarantee fee, which is $ 299 for the last classic model of the iPod, according to this document

    Pricing of the Service - The Apple iPod Support

    So Apple probably has a stock that's enough to last up to five years after 2014 (when the last classic model of the iPod has been abandoned).  This provider is unlikely to be an authorized dealer, as well as the iPod has not perhaps be covered by the standard warranty of one year.  That's why it comes in a regular white box, not a retail box.  It's supposed to be a replacement of maintenance for the iPod classic (latest model) owners.  It can be 'used', but it is still old.  Parts like LCD, HDD and the age of the battery by sitting in a warehouse.

  • Grammar red line will only appear on the words misspelled on the half top of my document, but not on the bottom half how to fix this?

    Grammar red line will only appear on the words misspelled on the half top of my document, but not on the bottom half how to fix this? I am writing an essay and I know I misspelled words it contains, but the red line will not work. What should I do about it?

    Hi Brittany,

    You use Microsoft Word?

    If you use Microsoft Word, you can post your request in the Forum Office for assistance.

    Microsoft Office Forum

  • am getting only a few wifi I do not receive my freewifi company, I was gettig 2 days before now I can't connect, but my roommate can connect

    am getting only a few wifi I do not receive my freewifi company, I was gettig 2 days before now I can't connect, but my roommate can connect

    Hi Vijay,

    1. have you made changes on the computer before this problem?

    2. you receive an error message or error code?

    This problem can occur because network settings, refer to the steps in the following Microsoft article and check.

    How to troubleshoot wireless network connections in Windows XP Service Pack 2: http://support.microsoft.com/kb/870702

    Manage your network connections: http://windows.microsoft.com/en-in/windows-xp/help/networking/manage-network-connections

    To set up automatic wireless network configuration: http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/wlan_client_configure.mspx?mfr=true

    Hope that the information provided is useful.

  • I have just insalled LR6 into the dev module, I see no picture, but only a blue window with lines through it. Can you help me??

    I have just insalled LR6 into the dev module, I see no picture, but only a blue window with lines through it. Can you help me??lr6.jpg

    In the Lightroom preferences, uncheck the box, 'GPU use' on the performance tab.

  • Please, I do not paid my plain of adobe, so hd it s cancelled... ok... but only on a few days, I paid. My payments, today, it's okay, bur, all the time I've opened my train, I get messages talk only, I have a few days to use my software... like "you hav.

    Please, I do not paid my plain of adobe, so hd it s cancelled... ok... but only on a few days, I paid. My payments, today, it's okay, bur, all the time I opened my train, I get messages talk only, I have a few days to use my software... like "you have 02 days expire your Adobe CC '... I try to charge my computer... and many other ways to solve this case, but I didn t have successul... Someone help me? TKS!

    You bought the CC on 24-01-14, which was cancelled & then you bought new CC 07/09/14, the error message you receive is due to the cancellation because the server tent to remember, please disconnect & reconnect the CC Office application to activate the new cc. The problem should be solved.

    You have 20 GB of space, stating that you have active CC.

    Concerning

    Baudier

  • v$ sql_plan contains only a few lines. How to increase the duration of retention?

    Table v$ sql_plan holds only a few values (30 lines) from the date of the day in one of the systems of production (in fact in the largest system). Y at - it a parameter to get Oracle to organise a longer period?

    You can use DBA_HIST_SQL_PLAN

    Only if you are an appropriate license.

    You need a larger shared pool or you need to reduce the number of operations that could invalidate these plans.

    Published by: DomBrooks on December 3, 2009 13:12

  • Ran Diagnostic Report/average line of the disc is 2

    About 2 weeks ago, I upgraded my Vista laptop to 1 GB. It works perfectly, but I ran a Diagnostic report and it showed in the information Section that average disk queue length was 1. I did a defragment disks and changed it to 2, but I still get the same message informtional, now with 2 instead of 1.

    Should I do something else because it works well? The only change I noticed is that I had to close it with the button yesterday because the screen was grey long after many updates of Windows. He opens normally today and made a few configuration. I got scared when I saw the screen after seeing some comments on a Blue Screen of Death or something like that, but I'm sure it was gray not only blue.

    Thank you

    AG

    Hi Ana,

    Length of queue Disk Avg... This counter is in fact closely related to the % disk time counter. This counter converts a decimal value to the % disk time and displays. This counter will be necessary at the time where the disk configuration employs several controllers for several physical disks. In these cases, the overall performance of the disk IO system, which consists of two controllers, could exceed that of an individual disk. So, if you look at the % disk time counter, you would see only a value of 100%, which represent the total potential of the entire system, but only that he had reached the potential of a single record on a single controller. The actual value may be at 120%, which displays the Avg. disk queue length counter. 1.2.

    The tab disk in the resource monitor (Start - Run - Resmon, or just the button resource monitor in the performance of the Task Manager tab) will show the disk of process activity to help understand this specific process is causing so much disk activity.

    For reference:

    The monitoring queue length

    http://TechNet.Microsoft.com/en-us/library/cc938625.aspx

    I suggest you send the request to the Forum here to improve the assistance on the issue:

    http://social.technet.Microsoft.com/forums/en-us/categories

    Let us know if you have other questions about Windows in the future. We will be happy to help you.

  • Unique guest VM uses 100% of CPU Guest, but only 7% of the CPU host (includes screenshots)

    We have a Dell T420 ESXi 5.5 server.  The host has to a single UC E5-2407 (4 Core 2.2 GHz without Hyperthreading), 16 GB of RAM and RAID storage.

    The host runs a single VM Windows Server 2008, which was a P2V conversion.  The virtual machine is currently assigned 1 Plug and 4 Cores, corresponding to the host CPU.

    Since implementing this server about a year ago, he had a problem recurring pop up every few months.  When the problem occurs, the Server 2008 VM suddenly max use of the processor and the terrible performance, but CPU is be contributed to the maximum, not by a single program, but several normal processes.  For example, WMI, explorer.exe and the Task Manager may show all 30% CPU usage.  In the meantime, even if the guest virtual computer has 100% CPU usage, the host will show only using 300 to 500 MHz of CPU, or about 7% of available.  It comes despite the fact that it is the unique virtual machine and has full reign of all the resources of the host.  If the problem seems to be not with an abnormal load on the Guest VM, but less than the resources of the host.

    Restart the virtual machine does not correct the problem, and restart, which normally takes only a few minutes, lasts 30 minutes.  In the past, restart the ESXi host temporarily solved the problem, however it popup until today and persists even after several reboots of ESXi host.  See the attached screenshots for parameters and symptoms:

    ESXi CPU Problem 1.png

    It's the performance monitor virtual machine, whereas the problem that happens.  Notes on the virtual machine, Windows 2008 reports 100% of a core 2.2 GHz CPU 4 CPU usage, while the side host, the CPU usage never goes 626 MHz.

    ESXi CPU Problem 4.png

    Here are the counters of the State whereas the problem that happens.  When you start the virtual machine, the WAIT and SLOW counters were quite high, but they finally dip down when startup is complete.

    ESXi CPU Problem 2.png

    Here are the parameters and the stats of the ESXi host.

    ESXi CPU Problem 3.png

    Here are the parameters and the stats of the guest VM so that the problem that happens.

    Other troubleshooting steps:

    We changed number of vCPU on the VM from 4 to 1, without change.

    We put the CPU reserve for the VM to 50% and 100%, no change.

    The machine virtual was version 8 and we have updated to version 9, no change.

    Has anyone ever experience this problem?  Any help towards a solution would be appreciated.

    Hello

    I would say that it is somehow related to the fact that the VM was converted from physical server. Here are a few questions you should ask yourself:

    Type of CPU on the computer old physical host and VM match? At least seller of CPU? It goes the same for the chipset: are there different chipset vendor on the two hosts?

    What type of card NETWORK VM uses?

    Has uninstalled the drivers card mother/CPU specific converted VM? The VM tools are installed?

    Uninstall the old drivers of VM, currently they are not visible in the Device Manager here some is read: http://itknowledgeexchange.techtarget.com/virtualization-pro/removing-old-hardware-after-a-p2v-conversion/

    I would also check the BIOS of the server - maybe there is some sort of option for active energy that interfere with the VM?

  • How to hide a column in the report when there are only zeros.

    Hi Experts.,.

    Is it possible to hide a column in the report when there are only zeros.

    Thanks in advance
    Vincent

    Vincent Krishna wrote:
    Hi Experts.,.

    Is it possible to hide a column in the report when there are only zeros.

    Thanks in advance
    Vincent

    No out-of-the-box, but there are several workaround solutions if you want to continue an any of them:

    (1) use a view selector. A single report will be a pivot table with the column, the other will have the same report less column. Users can switch reports.

    (2) use a column selector. The two choices would be this column or an empty space. If white is chosen (because the user has no values), the column "will disappear" according to the report.

    (3) guided use NAV. This method involves the intervention of the user. Build a small report using the single column and put a filter "is not equal to" 0. Because there is only a single column, so all lines are 0, the report returns no rows.

    Use this report in the properties of guided navigation from one section of the dashboard. Assign to this "If the report returns lines" and put the report that contains the column in this section. Now add another article on your table edge and in the properties of guided navigation of this section, set on "If the report will return no rows" and it points to the small report as well. In this section, put a second version of your report without the column in it.

    When the column contains all zeros, the second section with column will not display in it; the first section is not displayed. When at least a line contains a value not zero, the first section is displayed with the column, and the second part will not be.

Maybe you are looking for