Alternative to NOT IN

Hi,
Can any one provide alternative statement for
WHERE ML.ACCT_NBR NOT IN (SELECT ACCT_NBR FROM ACCOUNT_FLAGS WHERE FLAG_TYPE='ACREC')
I used the following statement but it is excluding rows if no account record is present in ACCOUNT_FLAGS table.
WHERE ML.ACCT_NBR = ACCOUNT_FLAGS.ACCT_NBR AND ACCOUNT_FLAGS.FLAG_TYPE != 'ACREC'
Can any one please help me.
Thanks,
Chaitanya

i have tried the following options:
1) not exists (took lot of time without any output)
2) Outer join (WHERE ACCOUNT_FLAGS.ACCT_NBR (+) = ML.ACCT_NBR AND ACCOUNT_FLAGS.FLAG_TYPE != 'ACREC'). This also excludes few account numbers that are not present in ACCOUNT_FLAGS table. This also returns the account number which has ACREC flag on it.
3) using minus (this takes a lot of time without any output)
4) WHERE ACCOUNT_FLAGS.ACCT_NBR (+) = ML.ACCT_NBR AND ACCOUNT_FLAGS.FLAG_TYPE (+) != 'ACREC' ...... This returns all the rows without considering the condition flag_type!='ACREC'
I have been trying to solve but in vain..
Can any one help?

Similar Messages

  • Error for open process order when BOM alternative is not found

    Dear colleagues,
    When I open process order. BOM alternative is selected according to the production version. But when  BOM alternative is not found system gives only information message and I can open process order, I want to prevent open process order when there is no BOM alternative according to the production version. Because the Bom can be deleted after creation production version.
    Thanks for your helping,

    Hi,
    U need to use an enhancement at the creation of order to check the active status of the bom and restricting the order creation when BOM status is inactive.
    see whether following enhancement is useful for your scenario:
    PPCO0006 Enhancement & EXIT_SAPLCOZF_003
    Please confirm.
    Regards
    Suri

  • How to secure/inhibit printing, copying or editing when "Mark: If these alternatives is not active.."?

    How to secure/inhibit printing, copying or editing when "Mark: If these alternatives is not active,  it is either because the document already has the security, it was signed with sertificate based signature or it was established in LiveCycle Designer ES"?

    How to secure/inhibit printing, copying or editing when "Mark: If these alternatives is not active,  it is either because the document already has the security, it was signed with sertificate based signature or it was established in LiveCycle Designer ES"?

  • BAPI CASESERVICE CREATEMULT - Alternative price not allowed for the service

    Hi,
    I am using .Net Connector to connect to BAPI. I am developing a .Net order processing application and intend to send the order information to SAP using BAPI_CASESERVICE_CREATEMULT.
    However, I keep getting the error message "An alternative price is not allowed for the service..". The service id is already setup at SAP and I am not sending any price information. I am only sending quantity. The DIFF_PRICE is set to 0.
    Any advice? I appreciate your help.

    Hi,
    I am using .Net Connector to connect to BAPI. I am developing a .Net order processing application and intend to send the order information to SAP using BAPI_CASESERVICE_CREATEMULT.
    However, I keep getting the error message "An alternative price is not allowed for the service..". The service id is already setup at SAP and I am not sending any price information. I am only sending quantity. The DIFF_PRICE is set to 0.
    Any advice? I appreciate your help.

  • In Material replication alternative Unit not replcated to SRM

    Hi Experts,
    We have a issue in SRM 7.0. We have replicated some products from ERP to SRM, for some material Alternative unit is replicated and we can use that UOM for creation contracts and SC. But for some materials this alternative unit is not replicated. When we made changes to these materials, replication failed in Bdocs with Below Error.
    1.Order unit T is not assigned to this product(For some materials already this Unit got replicated)
    2. Validation error occurred: Module COM_PRODUCT_MAT_VALIDATE, BDoc type PRODUCT_MAT.
    Please help me to find out the issue.
    Thanks in Advance,
    BR,
    Basu

    Hi,
    This is because the Log system entry in your ECC system has been changed after the first time it was setup.
    Kindly refer note 765018 to resolve your error.
    Regards,
    Nikhil

  • NEAR operator alternative when not using. oracle Text ?

    hi,
    I'm working on a project where i would need a Oracle Text 'NEAR like' operator ...
    here is my scenario ...
    in db we have Customers ... and every customer has some criterias like different search words( names, towns,cars,etc...) so for every customer i can create an SQL query out of criterias . ....
    now .... we can have a criteria like. ...... WHERE fulltext like 'john%'. or even distance search line NEAR inside CONTAINS. ... but then the Oracle text index is needed .....
    the only tAble on which Text index is created is our storage table that holds more then 4mil records and growing...
    my question is ... is there any way to have a query that would do the same thing as NEAR but without Text index ?
    here is how I start ....
    I get full newspaper article text from our OCR library ......
    then i need to check customer's criterias against this text to see which article is for which customer and then bind the article to the customer
    I could do it without Oracle using RegEx , but criterias can get really complicated ... like customer wants only specific MEDIA, or specific category , type , only articles that are from medias that are from specific country etc ... and many more different criterias ... and all this can be wrapped inside brackets with ANDs, ORs, NOT. ....
    So the only way to do it is to put it in Oracle and execute the correct query and let Oracle decide if the result is true or false .... but due to NEAR operator I need Oracle text ...
    So if I decide to first insert article into our storage table which has Oracle text index to be able to do the correct search .... how fast will this be ????
    will the the search become slower when there are 6mil records ? I know I can use FILTER BY to help Text index to do a better and quicker seach ... and how to optimize index ....but still
    I'm always asking my self..... why insert the article in a table where there are already 6mil articles and execute query when I only need to check data on one single article and. i already know this article ...
    I see two solutions :
    - if there is alternative for NEAR without using Oracle text index then i would insert data into temporary table and execute query on this table..... table would always contain only this one article. maybe one option would be to have one 'temp' table with Oracle text index in which i insert this one article and with help of Oracle text based on this one article do the search , and then maybe on a daily basis clear index ..... or when the article is removed from the table ... but this would mean having two Orcle text indexes, cause we already have Oracle text index on our storage table anyway....
    - another is to use Oracle text index and insert it into our storage table and hope for the best quick results ....
    Maybe I'm exaggerating and query like WHERE id=1234 and CONTAINS(...). will execute faster then I think
    If anyone would have any other suggestion I will be happy to try it ..
    thanks,
    Kris

    Hi,
    this is to my knowledge not possible. It is hard for Oracle to do, think about a table with many rows, every row with that column must be checked. So I think only a single varchar2 is possible. Maybe for you will a function work. It is possible to give a function as second parameter.
    function return_signup
    return varchar2
    is
      l_signup_name signup.signup_name%type;
    begin
      select signup_name
      into l_signup_name
      from signup
      where signup_id = 1
      and rownum = 1
      return l_signup_name;
    exception
      when no_data_found
      then
        l_signup_name := 'abracadabra'; -- hope does not exist
        return l_signup_name;
    end;Now you can use above function in the contains.
    select * from user_history_view users --, signup new_user
    --where new_user.signup_id = 1
    where contains(users.user_name, return_signup)>0;I didn't test the code! Maybe you have to adjust the function for your needs. But it is a idea how this can be done.
    Otherwise you must make the check by normaly check the columns by simple using a join:
    select * from user_history_view users, signup new_user
    where new_user.signup_id = 1
    and users.user_name = new_user.signup_name;Herald ten Dam
    htendam.wordpress.com

  • Alternative stylesheet not working for ie7

    hi guys,
    i have a site that renders perfectly in the usual browsers but in versions 7 or lower of ie, the navigation buttons appear out of line.
    ive used an alternative stylesheet to fix this but it seems to make no difference during testing. 
    here is how i am linking to it:
    Code: 
    <!--[if IE 7]><link rel="stylesheet" type="text/css" href="/scripts/ie7style.css" /><![endif]--> 
    after looking into it a bit more think that it maybe the doc type which is causing the problem, which is: 
    Code: 
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml" xml:lang="en" lang="en"> 
    does anyone have any suggestions as to why it might not be working? 
    thanks, 
    sm

    hi pziecina,
    thank you for the info and reply...
    ive already tried the 'if lower than' statement im afraid.
    the page can be found here http://www.artrotondo.com/Site/news.php
    do you have any other suggestions?
    thanks again,
    sm

  • Alternatives to Notes.app that will sync WITHOUT a cloud service

    I am looking for viable alternatives to Apple's Notes.app to keep and sync notes between my iPhone 4s and my Macbook Pro but THAT DO NOT REQUIRE ANY CLOUD SERVICES.
    Prior to OS X 10.8 Mountain Lion this was possible.  However, Mountain Lion removed the ability to use iTunes to sync Notes between devices (with or without cable) and now requires "cloud-type" connectivity/services.  While I like the new Notes interface in Mountain Lion Notes.app  I bemoan the loss of syncing by cable/iTunes and forcing the use of cloud servcies upon us.
    For me personally I want to sync these devices by cable and not via iCloud, IMAP or any service that resides outside of these physical devices. That's my personal preference, so let's not use this discussion to debate the pros and cons of the "cloud" way of doing things (and hopefully we will not divert into a cloud vs. no-cloud cat fight).
    What I really want to find is some kind of Note application to replace the functionality of Notes on the iPhone 4S (and maybe other iOS devices) and the Macbook Pro that will allow syncing between devices by cable and that does not require cloud services to sync between devices.
    I have read a little about Chronos "SOHO Notes" for the Mac, which apparently requires it's companion "NoteLife" for the iPhone. But there seems to be few other offerings, or I cannot find them.
    Does anyone have hands-on experience with these or other products?
    Does anyone have pointers to specfic product recommendations?
    It might be nice to find some open source applications rather than commercial.
    Thanks very much.

    Ok, I thought of something. Haven't done it yet, but will when I "re upgrade" to mountain lion (I downgraded back to Lion when I noticed the issues with notes. It really is a dealbreaker for me.)
    This isn't ideal, but it's what I'm going to do.
    Contacts (so far) can still be synced locally. Each contact has a "Notes" field. What I'm going to do is create a group in my contacts called "Notes", and when I have a note, I'll just create a new contact for it. I'll put the title for the note in the "Company" field, write the note in the "Note" field, leave the rest blank probably, assign it to my "Notes" group in contacts, and that will be my new "non-cloud notes app"
    Again, its not ideal, but I think it'll do.
    Apple, please dont *^%! around with the rest of the syncing apps. A cloud OPTION is nice. But it's not practical for a lot of people. This almost got me to switch to Android, becuase if I was going to be forced to sync through clouds, I no longer had a reason to stick with Apple products.

  • APP(f110) : Alternative Payee not handled in check register

    Hi,
    Request expert advice for the below situation -
    Vendor 1 is maintained as an alternative payee for Vendor 2.
    Now there exist 2 invoice say,
    Against Vendor 1 - $100
    Against Vendor 2 - $200
    Now, I create a auotmatic payment program (F110) and include both the vendors in the same proposal and execute -
    Ideally, there should be a single check against Vendor 1 for $300, but there will be 2 payment doc numbers generated against each vendor. --> This step is working fine.
    Issue:  When i check in the check register (FCHN), only the payment docuument number against Vendor 2 for $ 200 is available. 
    Where am i missing?  Is it config related?  or is it variant releated?
    Regards,
    Sridevi
    Edited by: Sridevi on Sep 30, 2008 1:44 AM

    Hi Sridevi
    Please check the table PAYR and see what is the check number in the table for the other payment document. The current check details should be there in the table. This means that in FCHN there is some selection parameter that you need to change. Just give the details of the paying company code, account id and house bank. Just give the check number and nothing else in the selection. I am sure the amount will show up. Let me know what was the result.
    Karthik

  • CS6 CC - Alternative Layouts not preserved

    I'm beginning to test CC for a small creative studio and have noticed something straight off the bat.
    CS6 InDesign files with Alternative Layouts opened in InDesign CC fail to 'convert' the Alternative Layouts. It just loads a single 'Layout' with all pages.
    Does anyone have any more information on this?

    Ah I guess this view is enabled automatically when you create an alternate layout and saves with the doc.
    Too easy, I'll give you a harder one next time.
    Thanks for the help Bob.

  • T COde CS15 : Report is not showing the "Alternative BOM No" for some BOMs

    Hello Guru,
    I am facing a problem for the transaction CS15, when I use this transaction, in the output for some materials, system is not showing "Alternative number" of BOM.
    I cheked Deletion indicator, status of the BOM, validity period etc.
    But unable to get the reason why system is not showing alternative BOM number for the some materials / BOMs.
    Thanks to give your expert comments or solution.
    Thanks in advance
    Hemant

    Hi Hemant,
    please check in CS02 if those top level BOm's which dont show alternative BOm number in CS15, do they really have alternatives?
    the most probale reaosn why alternative is not shown is they dont have any alternate BOM or they are variant BOMs.
    please check.

  • MRP RUN- KIT BOM explosion not working

    We setup one layer BOM’s for our maintenance KITs as parent material and components as child material.  For  example KIT is TS10000-K1 and components are TS10001, TS10002 etc setup as next layer with in the BOM. Both KITS and components are defined as material types ERSA (Spare parts). These one layers BOMs are setup as production BOMs and expected to create purchase requisitions for KITS and components by exploding BOMs during MRP runs. We use purchase requisitions and convert them into POs to procure both KITS and components. We DO NOT USE Panned orders and Production orders. 
    The safety stocks / reorder point are considered as demand for KITS and components as we do not have any external demand for KITS and components.  
    MRP run is creating purchase requisitions automatically for both KITS and components as per safety stocks and reorder point defined in MRP Views of Material Master. This is working as expected.  
    The issue is: KIT BOM’s are not exploding to generate purchase requisitions for the dependent components of KIT BOM. Please suggest the way to resolve this issue. 
    Split valuation: Also we plan to use split valued KITS with both new and refurbished. So we need BOM explosion for split valued KITS
    also (after the 1st issue is resolved).   
    I verified the following items to make sure the required configuration and data setup is defined correctly.
    1) Planning file activated Plant - OMDU 
    2) Executed MRP run with Total Planning - MDBT and MD02 (single item, multiple levels)
    3) BOM explosion for MRP activated- OS23 
    4) MRP type in MRP1 view- PD and VB (I tried both separately but BOM is not exploding).
    5) Procurement type “F” (MRP 2 view) and lot size “EX”  
    6) Planning strategy in MRP 3 view (tested w/o planning strategy and with strategies 10 and 40. But BOM is not exploded)
    7) BOM status and usage (status is active and usage is for production-CS02 and OS20)  
    8) BOM Validity date (Valid) 
    9) BOM structure in CS12 (BOM is exploding in CS11) 
    10) Availability check  
    11) Selection of BON ID to have BOM usage indicator assign (OS31).
    12) No alternate BOMs or production versions or work scheduling view are used.
    Please review the above 2 issues and suggest any workable solution. Thanks in advance!
    NOTE: I extensively used MRP with multi-level BOM explosion in my earlier projects without any issue. However the above issue is a  bit strange  why one layer BOM is not exploded in this case. 
    Regards
    Srini  

    Hi
    Thanks for your response. I reviewed all SAP notes and none of them are applicable to my scenario.
    1808396 - BOM changes not considered by MRP: I have not changed BOMs.
    1781324 - MD11: Valid BOM alternative is not found. We do not have alternative BOMs.
    1791009 - No BOM explosion after changing production version: We am not using production versions.
    Our Material KITS are PM spare assemblies set up as BOMs and consists of individual spare parts as components. We are creating purchase requisitions and not planned orders. We are not using PP functionality/Production orders.
    MRP is generating purchase requisitions for KITS and components as per ROP and safety stocks. In other words it is working as expected.  The issue is BOMs which are parent assemblies are not exploding to the next lower level components.
    Please note that I am not getting any error messages when MRP is executed.
    Regards
    Srini.

  • 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. ;)

  • Is bootcamp assistant not working in Mntn Lion?

    I'm trying to run Bootcamp Assistant (for the first time ever) in 10.8 and it is not playing ball.
    The download process seems extremely slow, it's wasted two blank DVDs by attempting to write to them then giving up and returning an error.
    So, I tried again with a properly formatted flash drive, it returned a message saying;
    "Could not complete the task; Windows support software is currently not available on the Software Update server" (or something to that effect).
    What gives? It's just not happening for me...

    Yeah I too just upgraded from Snow Leopard and to my horror saw Front Row was missing. I am so p**sed at Apple. I used it all the time, especially at night lazing off on the bed watching my itunes media or music, I thought that was half the point of having a huge 27" screen so you could sit far back and view your media with the remote. Fair enough if they feel they dont want to improve or maintain it, but why delete it? Why couldnt they just leave it as was and allow its fans to continue using it?
    Not to mention my mac is now running at a snails pace, freezing and beachballing for every task resulting in me having to order more memory so all in all this stupid upgrade has cost me over €125 I didnt have.
    Anyways I ended up trying Plex, seems a good alternative. Not as simple to use and remote just stops working in it every so often causing you to reboot but itll have to do. But it is free and worth a try.
    Really wish I had read up on Lion now!!!

  • Report for cost centers with alternative chart of account

    Hi.
    I try to make a report in cost center accounting and in profit center accounting with alternative chart of accounts. We have primary chart of account for 20 companies and alternative chart of account for 1 company. How can I make a report in CO-OM and PC accounting with alternative accouns? Is there any metod? Are on the intrenet somewhere instructions?
    Thanks

    Marko,
    CCA reports are possible only by cost elements (which an have different description from a GL account).
    PCA reports are possible only for main account (alternative account not available in GLPCT table).

Maybe you are looking for