NOT IN Operator

Hi Friends,
I am having problem in Not IN Operator.
My Query is--
select ord_no,ord_date
from ord_tab
where NVL(stat_flag,'P') not in ('I','i');
it should not give any data.
but is' giving me data.
when i remove NVL, It work fine.
but in some cases it can be null.
how to solve this ? any other alternative for this.
Regards
KarTiK PareeK.

Or you can use CASE, I find it more readable, especially when you have multiple OR's or AND's:
select  ord_no
,       ord_date
from    ord_tab
where 
        ( CASE
                   WHEN stat_flag NOT IN ('I','i') THEN 1  --  could be written as  WHEN UPPER(stat_flag) != 'I' THEN 1 too by the way
                   WHEN stat_flag IS NULL THEN 1
          END ) = 1Edited by: hoek on Apr 1, 2009 6:14 PM

Similar Messages

  • Invoice validation program error:Could not find operating unit options

    Dear Team,
    Once my Payables Open Interface Import program successfully completed, I am trying to running invoice validation program which is ended with warning as bellow,
    (Bulk CALCULATE) START SYSDATE 17-DEC-2012 04:04:19
    Could not find operating unit options
    Encountered unexpected error: User-Defined Exception
    (Bulk CALCULATE) END SYSDATE 17-DEC-2012 04:04:23
    and invoice placing into Dist Variance hold,
    my interface program placed data in to based tables (ap_invoices_all and lines_all ) but distributions are not getting generating. Can you please do help me.
    Find attached excel sheet for ur references.
    Thanks
    Sathiya

    Make sure the library (pll file) is in the path indicated by your FORMS60_PATH in the registry.
    Hope that helps,
    Karim.

  • Calling a WS from a servlet...EndpointPort does not contain operation meta.

    Hi all,
    I'm trying to call a service from a servlet but I get an error:
    Error: Endpoint {http://com.susan/SusanWS}SusanWebServiceEndpointPort does not contain operation meta data for: LoginWebService
    ...the WS is up and running (of this I'm sure...cause I also tested it with soapui...and it works..)
    The webservice is running on a local jboss (to which i can successfully connect, and see the wsdl...).
    the servlet is running on a local tomcat (which is also ok...).
    I'm trying to call the WS like this:
    Service service = new Service();
    Call call = (Call)service.createCall();
    call.setTargetEndpointAddress( new URL( wsEndpoint ) ); //http://localhost:8080/webservices/SusanWS (the same I used in soapui...so it should be right)
    call.setOperationName( "LoginWebService"); //name of the method i want to use...
    call.addParameter( "appCode", Constants.XSD_STRING, ParameterMode.IN );
    call.addParameter( "login", Constants.XSD_STRING, ParameterMode.IN );
    call.addParameter( "passwd", Constants.XSD_STRING, ParameterMode.IN );
    //            call.setReturnType( Constants.XSD_INT ); //left this out...should be the cause...
    Object retval = call.invoke( new String[] { appCode, login, passwd} ); //appCode,login,passwd contain the strings i want to  forward as input.if I try to run it I get(in the jboss log...):
    15:41:55,594 ERROR [SOAPFaultExceptionHelper] SOAP request exception
    javax.xml.rpc.soap.SOAPFaultException: Endpoint {http://com.susan/SusanWS}SusanWebServiceEndpointPort does not contain operation meta data for: LoginWebService
    at org.jboss.ws.server.ServiceEndpointInvoker.getDispatchDestination(ServiceEndpointInvoker.java:181)
    at org.jboss.ws.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:107)
    at org.jboss.ws.server.ServiceEndpoint.handleRequest(ServiceEndpoint.java:209)
    at org.jboss.ws.server.ServiceEndpointManager.processSOAPRequest(ServiceEndpointManager.java:355)
    at org.jboss.ws.server.StandardEndpointServlet.doPost(StandardEndpointServlet.java:115)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at org.jboss.ws.server.StandardEndpointServlet.service(StandardEndpointServlet.java:76)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
    at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
    at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
    at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
    at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
    at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
    at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
    at java.lang.Thread.run(Thread.java:595)
    don't know if it can help...the soapui request looks like this:
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:typ="http://com.susan/SusanWS/types">
    <soapenv:Header/>
    <soapenv:Body>
    <typ:LoginWebService>
    <LoginInfo_1>
    <appCode>WEB_SERVICES</appCode>
    <login>root</login>
    <passwd>root</passwd>
    </LoginInfo_1>
    </typ:LoginWebService>
    </soapenv:Body>
    </soapenv:Envelope>
    anybody has an idea of what I'm doing wrong?
    Edited by: Turbo-555 on Mar 18, 2009 8:36 AM

    if I change the code with:
    //call.setOperationName( wsMethod );
    call.setOperationName( new QName("http://com.susan/SusanWS",wsMethod)); //http://com.susan/SusanWS is the targetnamespace...the error changes into:
    16:55:21,051 ERROR [SOAPFaultExceptionHelper] SOAP request exception
    javax.xml.rpc.JAXRPCException: Cannot find child element: {http://com.susan/SusanWS/types}LoginWebService
    at org.jboss.ws.binding.soap.SOAPBindingProvider.getParameterFromMessage(SOAPBindingProvider.java:799)
    at org.jboss.ws.binding.soap.SOAPBindingProvider.unbindRequestMessage(SOAPBindingProvider.java:282)
    at org.jboss.ws.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:112)
    at org.jboss.ws.server.ServiceEndpoint.handleRequest(ServiceEndpoint.java:209)
    at org.jboss.ws.server.ServiceEndpointManager.processSOAPRequest(ServiceEndpointManager.java:355)
    at org.jboss.ws.server.StandardEndpointServlet.doPost(StandardEndpointServlet.java:115)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at org.jboss.ws.server.StandardEndpointServlet.service(StandardEndpointServlet.java:76)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
    at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
    at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
    at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
    at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
    at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
    at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
    at java.lang.Thread.run(Thread.java:595)

  • What is IS NULL doing in replacing NOT EXISTS operator with an outer join?

    DB version:10gR2
    An example from searchoracle.target.com
    The query which contains a NOT EXISTS operator
    SELECT M.ModulId, M.Modul FROM MODULE M
    WHERE NOT EXISTS
    ( SELECT PROJEKTMODUL.IdModul
      FROM PROJEKTMODUL
      WHERE M.ModulId = PROJEKTMODUL.IdModul
      AND PROJEKTMODUL.IdProjekt = 23 )is replaced by an equivalent outer join query
    select distinct
           M.ModulId
         , M.Modul
      from MODULE M
    left outer
      join PROJEKTMODUL
        on M.ModulId = PROJEKTMODUL.IdModul
       and PROJEKTMODUL.IdProjekt = 23
    where PROJEKTMODUL.IdProjekt is nullI don't understand what
    PROJEKTMODUL.IdProjekt is nullis doing in the above rewritten query.

    It is to perform an Anti-Join. As far as I know Oracle (starting with release 10g - I thought Release 1) rewrites your NOT EXISTS and NOT IN query to a Anti Join which looks like your second query.
    Look at the results of the query without the IS NULL predicate and see which records (from that set) should be selected to show the same results as the first query. The records of interest match the predicate IS NULL.

  • NOT IN operator giving the wrong results

    DB version:10gR2
    Why is NOT IN giving the wrong results. Isn't NOT EXISTS operator a flawless alternative to NOT IN?
    create table my_table1 (col1 number);
    insert into my_table1 values (1);
    insert into my_table1 values (2);
    commit;
    create table my_table2 ( col1 number);
    insert into my_table2 values (1);
    commit;
    select * from my_Table1;
           COL1
              1
              2
    select * from my_table2;
           COL2
              1
      --correct result
      SELECT * FROM my_table1 t1 WHERE NOT EXISTS
    (SELECT * FROM my_table2 t2 WHERE t1.col1 = t2.col1)
           COL1
              2
    ---correct result using IN
    SELECT * FROM my_table1 t1 where col1 not in (select col1 FROM my_table2 t2);
           COL1
              2
    Inserting a NULL to my_Table2
    Now the query using NOT IN is returning wrong results.
    insert into my_table2 values (null);
    commit;
    SELECT * FROM my_table1 t1 where col1 not in (select col1 FROM my_table2 t2);
    no rows selected
    Query using NOT EXISTS is still giving the right results.
    SELECT * FROM my_table1 t1 WHERE NOT EXISTS
       (SELECT * FROM my_table2 t2 WHERE t1.col1 = t2.col1);
           COL1
              2

    ScottsTiger wrote:
    can i use NOT EXISTS(with a proper Co-related subquery) as a safe alternative to NOT IN?Depends on your data and what you need to achieve.
    Personally I avoid using NOT EXISTS or NOT IN if I can really help it.
    My preferred method is to outer join the tables together and then remove any resultant rows where a value exists and I didn't want one. ;)

  • In and Not in operator

    i have one lacks records in the table.In this table i want to select the
    records whose status is GRADE A and GRADER B NOT GRADE C records
    SO
    which below query will be fast?In or NOT IN operator
    SELECT * FROM GRADE_Details where grade in('GRADE A','GRADE B');
    OR
    SELECT * FROM GRADE_DETAILS WHERE grade NOT IN('GRADE C');
    which one takes less time?

    Hi,
    did you try comparing the EXPLAIN plan of both the SQL's. Do you have INDEX on the grade field or data with NULL in the GRADE field.
    I think IN will be better , but you can only confirm after looking into the explain plan.
    thanks

  • Error: The sap bw system must not be operated in client 000

    Hi
    I login as a client "200" and create new user "imran" and then login as a client 200 and user imran successfully but when I goto T.code RSOR it shows "the sap bw system must not be operated in client 000" when I check the status it shows client 200 and user imran.
    so what is the solution??
    Regards
    Imran

    hi
    Yes I create new client "200" in a sap* then I login as a client "200" user "sap*" and password "pass" then create new user "imran" using copy DDIC then login as client 200 and user imran but result is same.
    Edited by: iskhan on Nov 5, 2009 7:24 AM
    Edited by: iskhan on Nov 5, 2009 11:36 AM

  • Could not invoke operation against the DB adapter due to BINDING. JCA-11812

    Hi,
    We are getting the following binding error BINDING. JCA-11812.
    Could not invoke operation against the DB adapter due to BINDING. JCA-11812 due to interaction processing error.
    Procedure(InputParameters,OutputParameters) ] Could not invoke operation against the 'Database Adapter' due to:
    BINDING.JCA-11812
    Interaction processing error.
    Error while processing the execution of the Procedure API interaction.
    An error occurred while processing the interaction for invoking the Procedure API. Cause: java.lang.NullPointerException
    Check to ensure that the XML containing parameter data matches the parameter definitions in the XSD. This exception is considered not retriable, likely due to a modelling mistake.
    Can anyone let me know what caused this error?
    Thanks,
    Chandu

    Hi:
    This message : Check to ensure that the XML containing parameter data matches the parameter definitions in the XSD. This exception is considered not retriable, likely due to a modelling mistake.
    seems that what u r sending to the DBAdapter, does not conform to the XSD that represent the message on that particular operation.
    Could u pls double check that?
    thx
    best

  • Nokia 500 Blocked - not permitted operation

    so when you choose video call form the calling menu on the screen appears "not permitted operation" and the phone is blocked
    Moderator's note: We have provided a subject-related title to help other forum users easily view and respond to this post.

    Thanks, but you can really associate a "video call" number in theaddress list, then if I push video call the phone blockes.Moreover in the menu "video call" appears but in the operating manual this operating is not mentioned. Then the front facing camera is not necessary if you call a 3G surveillance camera. You can implementing the operating SW on the phone anyway.

  • How can I use free programs on my ipad2 model A1396?I do not know operating system.

    How I can  use free ipad programs on my ipad2? I do not know operating system.

    You can tell what version of iOS you have via Settings > General > About > Version
    If you are in Iraq then unfortunately you can't currently get any content, including apps, from Apple (and Apple is the only source for apps) as there isn't currently an iTunes store in your country. If/when that is likely to change I don't know.

  • Could not complete operation - pathfinder in InDesign CS4

    Trying to do a very basic shape substraction and I  get the "could not complete operation. Pathfinder result describes empty region." I've been looking for a solution or patch but don't seem to find any and many of the posts seem old, don't work or don't offer any solutions.
    Am I missing something or can't find it? Or is the pathfinder pallette in ID pretty much useless. Any input would be helpful. Thanks in advace.

    This was a basic square atop a basic circle (subtracting to create basically a half circle) drawn with basic. Yesterday tried adding and other just to see and its the same message.  Now I just did it again, in reviewing your responses and it worked in a fresh document. Crazy. Could it be a memory thing? I tried the clean document yesterday and it didn't work. The only thing different today was closing InDesign opening and starting with a new document and doing this action first thing. 
    Thanks guys. Though I prefere Illustrators pathfinders too I did find IDs to be useful in a pinch which I guess may be a feature lost.

  • NCipher server not in operational mode : Cisco NAC

    One of the NAC server got rebooted and then while restart i am getting an error nCipher server not in operational mode. Please change the settings on back of the card. Also error-sshd-server not running.
    Please let me know how to make the ncipher in operational  mode and change the mode of NAC in FIPS mode.
    It is very urgent. Please let me know the solution.
    Regards,
    Tarunava

    The Cisco NAC is 3315 and software version is 4.1.2.
    Below are the error logs.
    [root@PLHO_CAS_01 ~]# cd /perfigo/common/bin/
    [root@PLHO_CAS_01 bin]# ./test_fips.sh info
    Installed FIPS card is nCipher
    Info-FIPS file exists
    NFastApp_Connect failed: ServerNotRunning
    Error-card is not in operational mode
    Error-httpd worker is in Non FIPS  mode
    Error-sshd  not up
    System not in FIPS mode
    [root@PLHO_CAS_01 bin]#
    [root@PLHO_CAS_01 ~]# /etc/init.d/sshd start
    Starting sshd:WARNING: initlog is deprecated and will be removed in a future rel
    ease
    key_load_private_pem: RSA_blinding_on failed
    Could not load host key: /root/.perfigo/sec/tomcat.key
    Disabling protocol version 2. Could not load host key
    sshd: no hostkeys available -- exiting.
    [FAILED]
    [root@PLHO_CAS_01 ~]# /etc/init.d/httpd start
    Starting httpd: Syntax error on line 167 of /etc/httpd/conf/httpd.conf:
    DocumentRoot must be a directory
    [FAILED]

  • IE display data, but not FF/Opera

    I've never quite dealt with anything like this before...I'll
    do my best to explain it.
    My Flash file takes info from a DB through PHP and displays
    them into several different radio buttons. IE displays the
    information correctly, but FF/Opera do not. I tried using static
    data, which displays fine in all browsers. But for some reason this
    dynamic data I'm trying to put into the radiobuttons does not want
    to display in FF/Opera.
    I was told by one individual it could be a font issue. I
    didn't preload any fonts. Regardless, I kept the radio buttons but
    used dynamic text fields to display the data. Again, the same exact
    thing occured. I have the same version of Flash Player installed in
    all browsers (according to this site).
    Can anyone possibly explain to me why this is happening?
    Again, it's not a question of the data not getting to Flash because
    it shows up fine in IE. Even if I make changes to the text I want
    displayed, it shows up correctly for IE, not FF/Opera.
    Really hoping someone can put an end to my misery.
    Tim Trice

    "timothytrice" <[email protected]> wrote in
    message news:e7kkvr$sbm$[email protected]..
    >I don't have a clue what you mean by that? I've never had
    to do anything like
    > that before? I'm using Trebuchet MS...but I've used
    _sans and _serif and those
    > don't work, either. I don't have a problem with the
    fonts with any of my other
    > files.
    >
    > Tim
    If you use a dynamic text font AND your system has that font
    AND you don't do any kind of tweening or effects on it, it should
    display ok. If you have the dynamic text moving around or
    effects on it you need to embed it's font outlines to keep it from
    disappearing. To embed font outlines, open up the properties
    window for the text and click on the 'character' button. Embed font
    outline.
    Hope that helps,
    tralfaz

  • VISA: (Hex 0xBFFF003E) Could not perform operation because of I/O error

    Hello
    I'm trying to communicate with a device which have to be tested with my application. So I send it a command to initiate the device to send me back some values. This values are sended continously with a baud rate of 57600.
    I create a VI to test this communication but I always get the error:
    VISA:  (Hex 0xBFFF003E) Could not perform operation because of I/O error
    I have googled for this thread, but all the described solutions didn't solve my problem (ex. Set Buffer Size to 48, Various Byte Count Values for the VISA Read function, etc.).
    Note: the VI works properly in the LabView 6.1! I have tested. I also tried to receive the Data with a Termial programm (works fine). But another COM Port (on an USB Serial converter) shows me the same Error.
    I just updated to Visa 3.4.1, but no success
    LabView 8.0.1

    Yeah it works
    of course buffer to 4096 and mask to 48
    I added a Flush I/O buffer (mask 16) before reading from Visa (problem was to read data).
    And suddenly it works fine.
    I can't reproduce where the error exactly was. Could it be possible that the RX buffer was already full
    at the time I would to read from Visa or at the time the COM port received data? There are some questions to find out:
    how does LV handle the buffers? will the buffers be cleared if LV starts? when does LV flushes the
    buffers?
    thx

  • Double click AI CS2 file, "Could not complete operation"

    Hi All,
    I do have an AI CS2 issue: When I double click and AI file to open, when AI is not running, I get the "could not complete operation" message. If I open AI first, then open the file all is well. I used to be able to open AI by doulble clicking the AI file.
    Any idea why that is?
    Thanks!

    rr,
    >I used to be able to open AI by doulble clicking the AI file.
    Please elaborate (before AICS2, before the full moon, before a change within Windows, or).
    Hi Steve.

Maybe you are looking for

  • Print quality problems with bluetooth Canon ip90 printer?

    I've had this problem on prior PBs and the canon website is decidely NOT helpful so here goes.... I have a pixma ip90v printer with a bluetooth adaptor added to my MBook. It prints fine and I had no problems adding it to my new computer (it was origi

  • HTTP 400 Bad Request

    Hello All, I'm up against a show stopper. I have a simple region (lets call it the "Quote Region") of type SQL Query that returns rows from a table which I will need tp update. Occasionally the query will return a large number of rows, depending on t

  • Can't properly capture audio from HV30

    FCP 6.06 OSX Leopard, and an HV30. Capturing (via firewire) all works fine except... I noticed the audio was coming in with only one channel. So checked my clip settings in the log and capture window. The 2 little circles on the audio toggle switch w

  • Why my iPad can't open app update (I open I see White scene)

    Why my iPad can't open app update (can open App Store and I go to update I see White scene)

  • Does Creative Zen plays M

    Hi, I have a Pure DAB radio that can record programmes direct to SD card in MP2 format (the standard file format for DAB broadcasts). If I remove the SD card and slot it into a Creative Zen, would this player play the files, or would I have to conver