Query with a subquery should return a value but does not work

When I run this SQL, it does not return value:

SELECT vfn.cat
OF vfn, valid_fishery vf vps_fishery_ner
WHERE vfn.plan = vf.plan
AND vfn.cat = vf.cat
AND vf.permit_year = 2010
AND vf.moratorium_fishery 't ='
AND vfn.vp_num = 211652
AND vfn.ap_year = 2010
AND vfn.plan = 'MUL '.
AND vfn.date_issued = (SELECT MAX (date_issued)
OF vps_fishery_ner
WHERE vp_num = 211652
AND ap_year = 2010);

To test, I remove the subquery and run it separately:
SELECT MAX (date_issued)
OF vps_fishery_ner
WHERE vp_num = 211652
AND ap_year = 2010;

Returns 2 April 10

Then I paste the date into the original query (using her TRUNCATES the function, of course, since I'm only part DDMMYY hardcode the date):

SELECT vfn.cat
OF vfn, valid_fishery vf vps_fishery_ner
WHERE vfn.plan = vf.plan
AND vfn.cat = vf.cat
AND vf.permit_year = 2010
AND vf.moratorium_fishery 't ='
AND vfn.vp_num = 211652
AND vfn.ap_year = 2010
AND vfn.plan = 'MUL '.
AND TRUNC (date_issued) = TO_DATE('02-APR-10');

And returns the required value, "A".

So why the complete query with a subquery does not work, if the value returned by the subquery is valid and works when you just pasted in there?
Thank you.

Hello

Maybe you should include this in the subquery as well?

AND vfn.plan = 'MUL'

Tags: Database

Similar Questions

  • Adobe Photoshop CC 2015 is compatible with Windows 10. The mine opens, but does not seem to work correctly... INCREDIBLY slow. Does not. Must I return to Windows 8?

    Adobe photoshop cc 2015 is compatible with windows 10? Just upgraded Windows 8 and PS opens but does not work properly. INCREDIBLY SLOW. What I can do or should I return to Windows 8? Windows love 10. Disappointed.

    Hi Ravenm,

    Could you please check and make sure that Photoshop is updated to the latest version 2015.1.2

    Also, please try the steps in the following article: Optimize performance Adobe Photoshop CC

    Let me know if it helps.

    Concerning

    Tanuj

  • Brush control with CTRL + ALT + click right + mouse/pen movement does not work with the tool liquify (photoshop cc 2015): what should I do?

    Brush control with CTRL + ALT + click right + mouse/pen movement does not work with the tool of liquefy; I can't change the size of the brush or hardness. OS win 7 Professional 64 bit, wacom tablet intuos 6.3.14 - 1 driver s pro, Photoshop 2015 CC worm.  2015.0.1 20150722.r.168

    What are your settings of GPU acceleration?  As I understand it, the Alt right click size and hardness adjust needs acceleration GPU to be turned on, but I have a feeling Brush hardness is always set to easy when using fluidity.  You can still see the quick mask as representation of the soft brush when Alt right click, but you can't change the hardness.

    Is that you can change the brush size and pressure (framed in red in my screenshot) Alt right click drag left and right changes size and down to pressure changes, and you can see what is happening in real-time by looking at the sign on the right.  It works independently of your acceleration GPU (IME) settings, but you don't get the effect of soft red quick mask.

    Does this fit with what you see, or you are not able to change things at all?  If not, then I've always found that fluidity consumes system resources, if you could check the Task Manager > Performance tab to see what kind of RAM and CPU use is using the fluidity.  That's what I see after direction the lens above with a big brush continuously for 10 seconds.  Note This is on a fairly quick NLE System.

  • Update KB937287 keep apearing as the only updated, try install many times, but does not work, tried it with the standalone version and it keeps apearing

    Update KB937287 keep apearing that the only update, tried to install a lot of times, but does not work, tried it with the standalone version and it keeps apearing, when I install it does not display an error message, just say that again was successful but when I try to look for more updated it apears again.

    Hi mayortom,

    Thank you for visiting the Microsoft answers Forum.

    You can follow the steps outlined in the article below:

    Troubleshooting Windows Update or Microsoft Update when you are repeatedly offered an update
    http://support.Microsoft.com/kb/910339/

    I hope that helps!

    Thank you and best regards,
    Abdelouahab Microsoft responds to the technical support engineer

  • Here's a strange. I have a HTML page with this time a wmv video. It works perfectly from a USB stick or SD card, but does not work when they are copied to the hard drive

    I have an HTML page created with web expression 4. It contains only a wmv video. It works perfectly when it is called from a USB stick or SD card, but does not work when they are copied to the hard drive. The results are the same with IE and Firefox. It don't make no difference if I use Media Player V9 or V11. He has no control on the page Media Player. Video and html files are in the same directory. Here is the code snippet:

    LIFT, DRAG, THRUST and GRAVITY










    If I run it on a machine with Win 7 there is no problem.

    Richard Grosser

    Hi Richard c. Grosser,.

    Your question is more complex than what is generally answered in the Microsoft Answers forums. It is better suited for the IT Pro TechNet public. Please post your question in the Microsoft Expression forums.

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

  • JavaScript works with an alert, but does not work without it. Why?

    This happened to me before, but I was able to solve my problem. Now I'm not.

    Let me explain: I have a javascript function which I call when I double click on a line on a table:

    [code]

    function CallServ (evt) {}
    source var = evt.getSource ();

    AdfCustomEvent.queue (source, "call",
    {
    },

    (false);

    auxDblClick.call (this, source);
    }

    function auxDblClick (CBC) {}
    split var = src.toString () .split ('=');
    var idButton = split [1];
    var split2 = idButton.split(':');
    okButton = split2 var [0].concat(':');
    for (var i = 1; i & lt; (split2.length - 1); i ++) {}
    okButton = okButton.concat (split2 [i], ' :');)
    }
    okButton = okButton.concat ('dc_cb1');
    var comp = AdfPage.PAGE.findComponent (okButton);
    Alert (COMP);
    AdfActionEvent.queue (comp, comp.getPartialSubmit ());

    }

    [/ code]

    As you can see, my alert line is commented. If it is not commented, the "auxDblClick" feature works very well: it will print the model on the alert, and then it will perform the action of the dc_cb1 button. However, when I commented the alert function, it stops working.

    I have PartialTrigger set to "true" on my dc_cb1 button and the clientComponent is set to 'true '. I've also set to true ClientComponent on the table, but it does not work.

    So, why the function working with alert, but does not work with the alert off the coast? What Miss me?


    P.S: jdev version 11.1.2.4.0

    I found the solution:

    Before the "AdfActionEvent.queue (comp, comp.getPartialSubmit ());" line, I used the update function. Like this:

          var t = document.getElementById (okButton);
       
          t.Focus ();

    Now everything works fine

  • I have Photoshop CS5 extended version 12.04 with camera RAW version 6.7. It does not work with files. NAVE. Help me please

    I have Photoshop CS5 extended version 12.04 with camera RAW version 6.7. It does not work with files. NAVE generated by NIKON 610. What can I do?

    Hi danielem,

    Need you minimum Photoshop CS6 & Camera Raw version 8.3 use of Nikon 610 RAW files.

    see the related link: supported by Adobe Camera Raw devices

    However, if you cannot upgrade to Adobe Photoshop CS6, then you can use the DNG Converter to convert your images to DNG and use it with Photoshop CS5

    Mac: Adobe - Adobe Camera Raw and DNG Converter: for Macintosh: Adobe DNG Converter 9.3

    Windows: Adobe - Adobe Camera Raw and DNG Converter: for Windows: Adobe DNG Converter 9.3

    Let us know if that helps.

    Kind regards

    ~ Mohit

  • with newly downloaded PDF books, font size adjustment does not work. Printing is still too low.

    with newly downloaded PDF books, font size adjustment does not work. Printing is still too low. How this fixed it please.

    Hi Bernice,

    Using Adobe Reader you will not be able to change the font size.

    To change the font size, you must have Acrobat installed on your computer free trial download Adobe Acrobat | Acrobat Pro DC.

    Kind regards

    Nicos

  • problem with the mouse and keyboard and windows update does not work

    Since last week to start the computer, I get an error message that the mouse and keyboard functions do not work. He then seeks the errors and then indicates that the service restarts. I want to fix this problem and according to Microsoft hardware, I should download "mkc.msi", which is missing from my computer, but when I do a search for a download, it always automatically directs me to the section "community". How can I correct this problem and get the appropriate download? I use Windows Pro 64 bit with IE 11 on an Acer laptop. I have the Acer site but it was a great help. Also, for the last 6 months, I could not update my computer windows update feature does not work and no error code is presented. I tried everything to restore or re-download the windows update feature, but nothing works, or I can't find a source. I got a blue screen 3 times indicating that windows must be updated and has been the reason for the blue screen. Unfortunately, I don't have a Windows 7 reinstall drive when restarting it spilled about 85 MG of data but not identify what has been dumped. Of course I could use help on this major problem as well even if it cannot be in the category correct community.

    Hello

    I understand that you are having trouble downloading MKC. MSI. I would certainly help you to fix this problem.

    Method 1:

    If you are referring to Microsoft Mouse and keyboard Center, then check out these links to download.

    Download mouse and keyboard Center to get the best out of Windows 8

    Mouse and keyboard Center 2.0 (formerly IntelliPoint and IntelliType Pro)

    Method 2:

    You can consult the following Microsoft article if you are unable to install the updates of Windows on the computer.

     

    Cannot install updates in Windows Vista, Windows 7, Windows Server 2008 and Windows Server 2008 R2

    http://support.Microsoft.com/kb/2509997

    Important: When running chkdsk on the drive if bad sectors are found on the disk hard when chkdsk attempts to repair this area if all available on which data can be lost.

    Registry warning

    To do: Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems can occur if you modify the registry incorrectly. Therefore, make sure that you proceed with caution. For added protection, back up the registry before you edit it. Then you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click on the number below to view the article in the Microsoft Knowledge Base:

    322756 (http://support.microsoft.com/kb/322756/)

    How to back up and restore the registry in Windows

    I hope this helps.

    Please report if the problem persists and we will be happy to help you further.

  • Demarshalling xml with the automatically generated class JAXB2.0 file does not work in jdeveloper 11.1.1.9

    I'm trying to familiarize themselves with JAXB in jdeveloper. I am facing some problems. There are a few test cases for which he works, for others it is not.

    Case 1:

    XML file is created manually. Respective java class to xmlelements is created manually. There is no ObjectFactory.java or jaxb.properties. Demarshalling this XML file works fine.

    Case 2:

    XML file is not created manually. All the respective java classes including ObjectFactory.java and jaxb.properties are generated using the widget ' JAXB 2.0 content XML Schema model "jdeveloper. I deleted ObjectFactory.java, jaxb.properties, and package - info.java. Demarshalling xml with this class file works fine.


    Case 3:

    Even in case 2, but this time I do not delete or change whatever it is generated and used as it is. It does not work. Get the following error.

    Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true
    javax.xml.bind.UnmarshalException
     - with linked exception:
    [Exception [EclipseLink-25008] (Eclipse Persistence Services - 2.3.1.v20111018-r10243): org.eclipse.persistence.exceptions.XMLMarshalException
    Exception Description: A descriptor with default root element rss was not found in the project]
      at org.eclipse.persistence.jaxb.JAXBUnmarshaller.handleXMLMarshalException(JAXBUnmarshaller.java:816)
      at org.eclipse.persistence.jaxb.JAXBUnmarshaller.unmarshal(JAXBUnmarshaller.java:109)
      at com.example.jaxbintro.JAXBExampleClass.main(JAXBExampleClass.java:36)
    Caused by: Exception [EclipseLink-25008] (Eclipse Persistence Services - 2.3.1.v20111018-r10243): org.eclipse.persistence.exceptions.XMLMarshalException
    Exception Description: A descriptor with default root element rss was not found in the project
      at org.eclipse.persistence.exceptions.XMLMarshalException.noDescriptorWithMatchingRootElement(XMLMarshalException.java:129)
      at org.eclipse.persistence.internal.oxm.record.SAXUnmarshallerHandler.startElement(SAXUnmarshallerHandler.java:208)
      at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1598)
      at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:455)
      at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:401)
      at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:239)
      at org.eclipse.persistence.internal.oxm.record.XMLReader.parse(XMLReader.java:157)
      at org.eclipse.persistence.internal.oxm.record.SAXUnmarshaller.unmarshal(SAXUnmarshaller.java:688)
      at org.eclipse.persistence.internal.oxm.record.SAXUnmarshaller.unmarshal(SAXUnmarshaller.java:271)
      at org.eclipse.persistence.internal.oxm.record.SAXUnmarshaller.unmarshal(SAXUnmarshaller.java:258)
      at org.eclipse.persistence.internal.oxm.record.SAXUnmarshaller.unmarshal(SAXUnmarshaller.java:218)
      at org.eclipse.persistence.oxm.XMLUnmarshaller.unmarshal(XMLUnmarshaller.java:306)
      at org.eclipse.persistence.jaxb.JAXBUnmarshaller.unmarshal(JAXBUnmarshaller.java:106)
      ... 1 more
    

    The project is included in the annex to this issue. It is ready for use. More information in the commentary to the java code. The main class is JAXBExampleClass.java.

    What is the problem with case 3?

    OK, I've been messing around with codes generated a bit and found the solution. The problem is that the value of the XmlSchema namespace had error in package - info.java class. There is no specified XmlSchema namespace in the XML file. Thus, the given value in the package - info.java was wrong.

    @javax.xml.bind.annotation.XmlSchema (namespace = "http://www.example.org", value / / wrong, set it to an empty string or that of your xml file, if it has any)

    elementFormDefault =

    javax.xml.bind.annotation.XmlNsForm.QUALIFIED)

    package com.example.jaxbintro.xmlerror;

    After you set the namespace to the empty string, since my xml file do not have one, code ran very well.

    @javax.xml.bind.annotation.XmlSchema (namespace = "",)

    elementFormDefault =

    javax.xml.bind.annotation.XmlNsForm.QUALIFIED)

    package com.example.jaxbintro.xmlerror;

    The file package - info.java can also be removed and it will work. For more details on the package and XmlSchema annotated level, what information on the package class is for, be found in the following link.

    https://JAXB.Java.NET/NoNAV/jaxb20-FCS/docs/API/javax/xml/bind/annotation/XmlSchema.html

  • SQL query simple SQL Developer takes, the wizzard of XE does not work

    Hello everyone

    I wrote this simple query that developer SQL works well, but when I try to run a report based on this sql query, it tells me invalid sql statement. It's true, maybe it's not valid because this IF clause in there... but Developer SQL seems to be very tolerant or includes more...

    I wrote this is because obviously if there is no Boss, ie = 0 then I would get an error when it division by 0, so I put that 0 just for selecting the right


    If count (bosses) > 0
    Select company, zip code.
    sum (Boss/staff)
    assessment
    Group of company, zip code

    Thank you very much

    Alvaro

    Ok. This should work:

    Select company, zip code.
    -case when count (staff)! = 0 here end sum (Boss/staff)
    assessment
    Group of company, zip code

    If this does not work, could you please explain, how your table looks like?

  • I said that I have to install Chrome to place an order at Walmart. What should the Chrome that Firefox does not work?

    I have placed several orders of Wal-Mart before today using Firefox without any problems. But today, nothing but problems. I tried for more than 4 hours, get this order to cross. I told cat line of Walmart and told me that I have to install Chrome to place an order. They don't answer when I asked if Walmart belonging to Chrome.

    I deleted the cookies and cache and restarted but none of this has worked. While Chrome has that Firefox does not work? I tried Chrome before and he hated and had a devil of a time he get off my computer. I don't want to go there again.

    I have attached a copy of the message that I get seems to indicate that it is a problem within Wal-Mart, but I said that it was with my browser.

    I have a laptop Toshiba Satellite running Windows 7 Ultimate 64 bit and using Firefox 40.0.3.

    Any suggestions would be greatly appreciated. Thank you.

    Thanks for your reply. I just figured out the problem.

    All started when I tried to pay my order at 13:00 this afternoon. I am persistent and don't give up easily. Five hours later, I found an error in their programming, which allowed me to add an item to my shopping cart that was a purchase in store only. But then when I went to pay for it, he became confused and wouldn't let me order but didn't tell me why.

    I solved by moving all items in the basket to saved for later and then add one at a time, trying to get to the car after each addition. It took a while because there are 20 items. He had the same problem when I added the item in the store to the cart and tried to pay for it. So I deleted and purchased on Ebay.

    Now I know probably as much if not more than any of their populations of the Chat line that can only be read on a book script.

    It's a relief that I don't have to use Chrome. I really like Firefox and would not change.

  • Why to the can't 'Shared VMs' does not allow to share folders with the host and why the copy/paste does not work on them? :-((

    I want to put in place a "build mini-server' for our team. Since VMware Player is not taken in charge more I had to use VMware Workstation, and with some success, I put things up. But now more and more surface of trouble!

    To enable auto-start for the virtual machines, they must obviously be "shared." But it looks like, with this, the nuisance that these virtual machines cannot share folders more with the host. And also, it seems that copy and paste does not work with these "shared VMs.

    Is there a work around to get these features also works with 'shared VMs?

    It is VERY annoying and tedious to always have to these VMs to shuttle between shared and non-shared mode just to be able to transfer data or new versions of code for them!

    Thank you for using the workstation. How to create a script with:

    WS t vmrun start "c:\my VMs\myVM.vmx".

    And add the script to the Windows Task Scheduler to run at startup.

  • InputText DataBound is showing the value but does not display inputtext contour

    Hello everyone,

    I am facing a problem when working with Oracle ADF. Here's the usecase for this problem.

    1 > I have created a simple bpel webservice that returns data from database
    2 > then created the datacontrol therefor in my adf application
    3 > once I dragged and spent attributes return webservice as "FirstName" and "LastName", etc on a page like jsff datacontrol
    inputText.Removed xml links unnecessary and kept as simple as:

    < af:inputText value = "#{bindings." FirstName.inputValue}"id ="it1.
    label = "name *" >
    But the problem is when I run the application, the Web service is called, also return values, but the inputText contour is not there. The values will appear as an outputText.

    I have this connection, I should mention that I'm using Windows XP 2002 professional version SP3 and JDeveloper is 11.1.1.3.0.

    I tried many things but could not obtain the success.

    Any solution to this problem will be highly appreciated. Thanks in advance.

    Please let me know in the case of any information on this.

    Kind regards
    Ayan

    Hello

    This is because Web Services are not editable, but rather ask you to explicitly call a method. To change this behavior, in the data control panel, select the node of the collection that contains the attributes that you have created the form of. Us ethe mouse right button and choose "EditDefinition. Select attributes and open the property inspector. In the property inspector, find "isUpdateable" and assign the value true to the attribute.

    Save the changes and update the Panel (refresh icon) DataControl. The entry field makes now editable

    Frank

  • With recent updates, restoring with restore points is more and now IE does not work properly.

    I just had a few security updates for my machine and now there is no restore points, restore reports again that restore points are invalid, try another date of restoration (I'm guessing on this one).  Internet Explore ceased operation (for denial of service in IE error messages).  Norton finds nothing.  Any suggestions?  P.S. I don't browse the internet, check e-mail, or any other activity on this machine and only play an internet game on it.  Any suggestions or helpful hints before moving a complete system recovery disc?

    You used the word "n" and system restore in the same paragraph.  It's a good sign for boredom.

    Here are a few known issues in SR and Norton, you can read and see if they will work for you.  It is possible that your SR will never work unless you reinstall the system restore (not XP - just the system restore part) which would mean you would lose all your old PHI from scratch with new RPs.

    I can't help you with your IE, but if you provide the following information, maybe someone else can.

    SR already worked successfully for you in the past?

    What is your system brand and model?

    What is your Version of XP and the Service Pack?

    What is your version of Internet Explorer?

    You have a different browser like Firefox or Chrome that operate and is only IE afflicted?

    See if IE will work if you click on start, programs, accessories, System Tools, Internet Explorer (No Add-ons).

    What is the exact error that you see when you try to use IE?

    Describe your current antivirus and software anti malware situation: McAfee, Norton, Spybot, AVG, Avira!, Defender, ZoneAlarm, PC Tools, MSE, Comodo, etc..
    What is the issue that you are experiencing that you think that the system restore will be remedied (or you are just convenient)?  System Restore is not a time machine.
    Some tools Anti Virus 'protect' your system so that they will not allow a restore of the system work properly.
    For example, if you use Norton/Symantec products, you will see a message like this:
    Restoration incomplete. Your computer cannot be restored...
    It is also a popular Symantec problem (well, I'll be polite and call an "undocumented feature"...), they wrote an article about it:
    According to what you use for malware protection, you may need to disable the product temporarily, do the system restore and then turn the products light up again when the system restore is complete.
    Sometimes you need start your system in Mode safe and so that your protection programs are not running, and then do the system restore.  Tips from Microsoft in some of their articles that if the system restore does not restore your computer, start in Safe Mode, and then run the system restore.  It works for some configurations.
    System Restore is sometimes so afflicted or Restore Points are suspicious, the best solution is to reinstall your system restore.  This will remove the old Restore Points, but sometimes it's the only way to fix a broken system restore.  You don't have to reinstall XP, only the part of system restore.
    That can leave you with your problem of unspecified origin that you hope the system restore will fix (using a system restore is usually not equivalent to fixing the problem though).
    Give these ideas some consideration if they apply to you.

    I would like to deal with the problem as if there was no such thing as the system restore, fix your other questions, stabilizes, then get your SR works after that.  Certainly, it should work well, but I wouldn't count on it as a way to solve problems.

Maybe you are looking for

  • Qosmio F20 MXM Support

    Hello is there someone who could tell me if the Qosmio F20-149 supports MXM II? I would like to replace the go 6600 with go 7600 MXM II, is this possible? THX for the help!

  • How permanently average data of dynamic tension

    Hi all I LV 8.6 base. I gain a continuous voltage analog of the signal by a transducer of RPM using a DAQ Assistant. the display changes around a little and she could use some smooth. My thought is using data in groups of samples. The data type is dy

  • In Sonic I get the message: no recordable or rewritable device compatible could be found on your system

    No window menu drop-down is displayed when I insert a music CD. When I try to open SONIC, it does not open and a window pops up with the following: no recordable or rewritable device compatible could be found on your system. This happened after MS fi

  • Help get rid of the virus or spyware or malware?

    Not sure if this is the right place to put this, but I had a virus or what I think is a virus for a few weeks. It affects only my email.  I send through Verizon. I contacted them and changed my password for my accounts and I'm still getting these ema

  • Report paging system

    How can Apex 4.2, for conventional reports, I make sure to display 50 or 75 lines per page. Given the pagination schemes allow only 15 lines per page.Please advice.Thank youRN