Error giving a subquery, but with the outer query, it gives no error.

Hello
The following query gives error "ORA-00979: not a GROUP BY expression" (I know to use the filter condition in the WHERE clause, but for reasons explaining the problem, I use the HAVING clause)

SELECT DeptNo
WCP
HAVING comm IS NULL;

But when I use it as a subquery in as long as below, the query will run successfully (resultset may be wrong).

SELECT d.
BY d Dept.
(SELECT deptno
WCP
WITH comm IS NULL) a
WHERE d.deptno = a.deptno;

Please explain the reason.

Kind regards
Danish

Sort of philosophical question. But you're right, this behavior can be misleading.

Tags: Database

Similar Questions

  • How to exclude records from the outer query

    My apologies if this was requested. I find no answer. I don't know what terminology should be for that matter.

    In simple terms, I want to use the custom in where clause to select records. Problem is function will fail if applied to old records, as there was no relevant data. I have logic to exclude old records, but the problem is that this process running function before old records are excluded. I tried an inside view to exclude records before their passage in the outer query, but this does not resolve the situation.

    Below shows high level required

    Select x

    tab

    where (condition to exclude the old records)

    and function (tab.y) = value

    If I rewrite as below, still have the problem. Was hoping to exclude former records apply before function.

    Select inn.x

    Of

    (select x,

    There

    tab

    where (condition to exclude the old records)) inn

    where function (inn.y) = value

    Thank you

    Hello

    Including ROWNUM in the result set of the query-void will force the subquery to do first:

    Select inn.x

    Of

    (select x,

    There,

    ROWNUM AS r

    tab

    where (condition to exclude the old records)

    ) inn

    where the function (inn.y) = some_value

    Since ROWNUM depends on the WHERE clause of the query-sup, the query cannot be rewritten to the main to do first query WHERE clause.

  • Count (*) with the nested query

    Hello
    I have a question about the count (*) with the nested query.

    I have a table T1 with these columns:
    Number of C1
    Number of C2
    Number of C3
    Number of C4
    Number of C5

    (The type of each column is not relevant for example).

    This query:
    Select C1, C2, C3, C4
    from T1
    Group C1, C2

    It is not correct becausa C3 and C4 are the columns specified in the GROUP BY expression.

    If you run this query:
    Select count (*)
    (select C1, C2, C3, C4
    from T1
    Group C1, C2)

    I don't have an error message (properly, the result is the number of records).

    Why?

    Thank you.

    Best regards
    Luca

    because the optimizer rewrites as

    SELECT     COUNT(*)
                  FROM   T1
              GROUP BY   C1, C2  
    

    G.

    Edited by: g. March 1, 2011 09:19

  • How to animate a line with the pen tool to give the impression that it is plotted?

    How to animate a line with the pen tool to give the impression that it is plotted?

    Or you can choose the pen tool (g), set the padding to zero and the race to what you want, then draw a path, then press U twice to reveal all of the properties that have been changed for the layer, and then click Add (top-right) and select Connect the tracks.

    To make the race work just animate the start or end point and sent to paint on original or reveal original or normal.

  • Create and schedule the iBot cover seed with the saved query

    Hi all

    Can I know how to create and schedule I Bot seeds cached with the saved query ((iBot to directly run a daily load of reseeding the cache)

    Here's the documentation:

    30%

    http://download.Oracle.com/docs/CD/E10415_01/doc/bi.1013/b31767.PDF

    31%

    http://download.Oracle.com/docs/CD/E21764_01/bi.1111/e10544/delivers.htm#i1060405

  • Lost my copy and I tried to download the iso from the Microsoft web site, but my product key will not validate, pass this message: we had a problem with the validation query

    Original title: error Windows 7 installation files

    I bought a copy of Windows 7 at Tiger Direct on 22/05/2014.  I lost my copy and I tried to download the iso from the Microsoft web site, but my product key is not valid.  I get this error message

    We had a problem with the request for approval.

    FAQ

    See for other directions:

    http://answers.Microsoft.com/en-us/Windows/wiki/Windows_7-update/how-to-what-are-my-options-for-obtaining-Windows-7/528163c1-0b2e-4AD2-a26d-7112851d1dc2

  • Problems with the Out-of-Band updates

    I am running Dell v2.0 OME.  Everything works great including the updates via OMSA. However, the updates made via the iDRAC connections fail every time.

    I could say I tried everything, but I thought someone might help me with troubleshooting whole again in case I missed something or did something wrong.

    The connections of the DRAC live on a different subnet, but there is no firewall between these two networks.  Only a router that routes traffic between the two.  As I type this I came with some other ideas, but if you have something to offer that would be great.

    Here is the error I get trying to deploy the updates.

    Results:
    Download the packages.
    The call of method InstallFromUri to download packages to the iDRAC
    Download package: BIOS_V7P04_WN64_2.2.3.EXE on iDRAC
    Download the package has started successfully and the Job ID is JID_121890750543
    The URI given to iDRAC to download it from: http://[serverip]:1278/install_packages/Packages/BIOS_V7P04_WN64_2.2.3.EXE

    Checking the status on the following tasks: JID_121890750543
    The JOBID JID_121890750543 failed with the following message is displayed:
    A package of updated network file transfer has failed.
    MessageID: RED051

    Download error occurred.
    Package BIOS_V7P04_WN64_2.2.3.EXE didn't upload on the target device. Update failed.
    The task of software update failed.

    Thank you

    Well the call with Dell has not helped, but eventually I was able to understand it.  I learned that during an attempted search on a (executable) package for download, IIS returns a 404 error.

    An example URL is http://[nameofserver]:1278/install_packages/Packages/SAS-RAID_Firmware_C3X7D_WN32_12.10.6-0001_a12.exe

    I had to open the Web.config for the bulk of the site and adds the following snippey inside the section.


            

    The site's web.config file is located in C:\Program Files\Dell\SysMgt\Essentials\wwwroot\Essentials\.

    Once the module was in place, I was able to navigate to any package and it would prompt me to download it. From there, I tested the updates again on the ESXi hosts and all is well again. I hope that this little information helps someone else!

    Thanks again for everyone's help.

  • Trouble with the outer glow

    I'm trying to recreate the logo "dark side" of Star Wars: The Old Republic as a fun side project, but I have encountered some problems. I use no effects of light for many in my industry, if it's become a bit of a learning experience for me! I started by creating the shape with the pen tool and the I made to be as accurate as possible. The I tried to give him the outter shine? I thought it would be so simple right? Now I'm on the forums asking for help.DarkSide.jpg

    This is as far as I got.

    3122p_0c_2b.jpg

    That's what I'm trying to replicate. Any tips? Ideas? Any help would be greatly appreciated!

    First, please provide a glimpse.

    Now, instead of outer glow, try adding a line of thickred in the appearance Panel, then application of a Gaussian blur to the outline in the menu effects. Note that the stroke is below filling.

  • With the front camera, microphone does not work, but with the camera back, it works fine. Please give me solution

    whenever I have to video chat with anyone with front camera on they won't listen to me. Even when I record with fromt camera microphone does not work with the camera back, everything works correctly and even with siri, I can't talk more but when I take a call they can hear perfectly

    Get help with microphones on your iPhone, iPad and iPod touch...

  • El Capitan 10.11.2 disconnects from the network of Canon printer macbook pro after each use but with the same OS version iMac remains connected

    How to prevent my Macbook Pro El Capitan 10.11.2 going to disconnect my network printer Canon?   My iMac running the same OS version don't unplug and behaves like any normal wireless connection.  I deleted the printer and added back, reset printing, etc. nothing works.  Given that the Mac is 6 "each other and 5 feet of printer during the last test, it must be something specific to the Macbook.  The Macbook identifies the printer after each reboot the printer as printer Canon right, but once the task is completed does not have the printer.  Everything is on the same wireless network. Computer Windows also recognizes the printer and it keeps alive after printing.

    Please read this message before doing anything.

    This procedure is a diagnostic test. It is unlikely to solve your problem. Don't be disappointed when you find that nothing has changed after you complete it.

    The test is intended to determine if the problem is caused by a third-party software that loads automatically at startup or logon, by a device, by a police conflict or corruption of system files or some system caches.

    Disconnect all devices wired except those required to test and remove all the expansion cards from secondary market, as appropriate. Start in safe mode and log on to the account of the problem.

    Note: If FileVault is enabled in OS X 10.9 or an earlier version, or if a firmware password is defined, or if the boot volume is a software RAID, you can not do this. Ask for additional instructions.

    Safe mode is much slower to boot and run as normal, with limited graphics performance, and some things work at all, including an audio output and a Wi - Fi connection on some models. The next normal boot can also be a bit slow.

    The login screen is displayed even if you usually connect automatically. You need your password to log on. If you have forgotten the password, you will have to reset it before you begin.

    Test in safe mode. Same problem?

    After testing, restart as usual (not in safe mode) and make sure you always have the problem. View the results of the test.

  • My new Apple TV v4 does not smoothly on Airplay with my MacbookPro and Air laptops but with the iPhone and iPad Airlay gets so juddery and then goes off - laptop computer WiFi connections all that happens on clues?

    Devastated to find that the new AppleTV works great on Airplay / mirroring with the iPhone and iPad devices but completely useless on the NEW laptops.

    Trying to show any video for example utube creates immediately hop on the TV screen when you use the Macbook and in no time the WiFi connection is stunned.

    What is going on?

    I use ElCapitan, and the last 15 "16GB i7 Macbook MacbookPro and not expect a problem with streaming media.

    Absolutely well on Airplay with bith an iPhone 6 Plus and also an Air iPad

    This will be due to a network problem. There is a difference between mirroring of a phone/Tablet and grow to a full desktop in real-time

    Mmake that there is no other activity (other streaming, web browsing, backup network etc.)

    Try to connect the Apple TV via ethernet

    To see a current state of the network to obtain a report of istumbler or similar. Look for the strength of the signal, noise, networks nearby

    Test on another network

  • Transfer old iPad new iPad, but with the new account.

    I have a MacBook and an iPad 2, but actually the iPad is my wife, using my Apple for Apps etc ID. It syncs with my MacBook.

    We will buy a new iPad which belong to him completely, with its own (new) Apple ID I will then use the old iPad.

    How to transfer ALL of the former (who is using my Apple ID) to the new (which will use the Apple of the wife ID)?

    If you use another Apple ID you should just start fresh. Choose "set up as new" when you set up. If you mean content itunes or more by 'everything' then that won't transfer via. This content is related to the Apple which bought ID.

    If you talk about the General data (photos, documents, etc.) then you can sync on the new device when you set up.

  • question... but with the added new config/partitions cloning

    I just bought an SL500 and need to update my hard drive of 160 GB / 5400 RPM 250 GB / 7200 RPM. to add to the process I also wish to add/install XP PRO as main/C on the new hard drive partition. I am very familiar with cloning and upgrade, but my question is about the partition of VISTA recovery and partition of LENOVO CARE. I will be able to access these tools as I do now as long as I keep the same volume of wall letters? or y at - it somewhere that I will need to change the settings? After installing the new hard drive config will be as follows... XP PRO on the C partition. BASIC of VISTA on partition D... DVD on E (same as current)... LENOVO on (same as current) S... SERVICEV003 (same as current) q. is this a correct approach to ensure that I can continue to have the original installed tools on the new hard drive? Thank you mc

    Thanks for the reply. Well it took a minute, but I got things set up quite as much as I wanted to here are the links that got me here. as you suggest on the slip streaming, fortunately it is NOT necessary for the SATA controller. so for those who want to use with XP PRO SP3 SATA (in my case) with the portable computers SLxxx then pls see the Intel Matrix Storage Manager section first.

    http://www-307.IBM.com/PC/support/site.WSS/MIGR-70413.html

    http://www-307.IBM.com/PC/support/site.WSS/document.do?sitestyle=Lenovo&lndocid=MIGR-70002

    http://www-307.IBM.com/PC/support/site.WSS/document.do?lndocid=MIGR-61432

    http://apcmag.com/how_to_dualboot_vista_with_xp__stepbystep_guide_with_screenshots.htm

    http://apcmag.com/how_to_dual_boot_vista_and_xp_with_vista_installed_first__the_stepbystep_guide.htm

    http://Forum.NotebookReview.com/showthread.php?t=188992 (article that points to most of the threads above... thanks to the OP for this one)

    http://NeoSmart.NET/DL.php?id=1 (great tool for the management of boots double XP/VISTA)

    I hope this helps others too... mc

  • Adobe Lightroom recording without number in series (but with the box in which it was purchased.)

    I got Adobe Lightroom as a gift about a year ago. I thought that I had it installed on my computer, but when I tried to open it a few days ago it prompted me to license and enter it again. The problem with doing this, it's that I can't find my card with the serial number. I have the boxes and some of the documents that were included, but I can't find the card with the serial number. Is it possible for Adobe to help me get my product up and running without my serial number?

    Hi Emily,.

    Please see this link:

    Quickly find your serial number

    Let me know if it helps.

    Concerning

    Megha Rawat

  • I usually use my account from Microsoft to connect, but with the new update that I can not connect with her

    After the new update on the login screen it asks a Skype name and password. I used to use my microsoft account to connect to Skype and therefor have no idea how to connect with this new interface. I tried every password I can think and even changed my password on behalf of microsoft and still can't connect.

    Have you tried the login with the Microsoft account option.

    https://support.Skype.com/en/FAQ/FA12081/how-do-i-sign-in-to-Skype-for-Windows-desktop-with-my-micro...

Maybe you are looking for

  • I HAD THE OLD VERSION AND NOW IT DON'T ME LETS NOT BACK IN

    I installed firefox again because my Player did not work and now I can not at all

  • What to do when iPhone 6 will turn off by itself?

    I've had my iPhone since June of 2015 6. I have always been careful enough with it and have never broken broken screen or caused dents in the aluminum body. At the beginning of January 2016 (this year), I had not had a single case on my iPhone and he

  • Install Windows 7 on a new partition

    I have a Satellite P300-19F and it came with Win Vista. I am trying to install Win 7 on a new disk volume, but I do not have the Toshiba provided with equipment programs (software for webcam, DVD, etc.).Where can I download all software from Toshiba?

  • change the same variable in different loops

    Hi all I use an event producer/consumer-controlled architecture where the two loops run processes acting on a common variable. To be more precise, I intend to change a flag photo in the loops of consumer and producer. That's why I need to share this

  • Corrupted script

    That means the following;  "Script is damaged OR has been tampered with?