Finding accounts where child does not match Parent acct category

Hi,
I have an interesting problem. There is Parent Account Group with child accounts under it. The child accounts must
have been assigned the SAME category as the Parent account. If they are not, then they must show-up on the mismatch report.
So, if there is a Parent Acct 1 with childacct a AND childacct b and if childacct a has category of Base and childacct b has category of offshore, while Parent Acct 1 has category of Base, then because BOTH A AND B do NOT have the same category as assigned to its parent, it should show up on report.
I can get all children but how do this: check if any ONE acct category is NOT the same as the Parent???
DO I have to use If AcctCATPARENT <>ANY(CHILDcate). then select Acct ID from table ....will this work??
This is urgent, any help is appreciated!!
Regards,
hena

Hello
if you have a problem please remember to post some create table statements along with inserts to provide sample data to work with. Also, remember to show what the output is you're expecting and what you've tried so far. And finally remember that this is a volunteer forum so there aren't any urgent requests.
anyway, isn't it just a matter of joining between parent and child?....
WITH parent_acc AS
(    SELECT 1 ID, 'cat a' cat FROM dual UNION ALL
     SELECT 2 ID, 'cat b' cat FROM dual UNION ALL
     SELECT 3 ID, 'cat c' cat FROM dual UNION ALL
     SELECT 4 ID, 'cat d' cat FROM dual
child_acc AS
(   SELECT 1 ID, 1 parent_id, 'cat a' cat FROM dual UNION ALL
    SELECT 2 ID, 1 parent_id, 'cat a' cat FROM dual UNION ALL
    SELECT 3 ID, 2 parent_id, 'cat b' cat FROM dual UNION ALL
    SELECT 4 ID, 2 parent_id, 'cat b' cat FROM dual UNION ALL
    SELECT 5 ID, 3 parent_id, 'cat a' cat FROM dual UNION ALL
    SELECT 6 ID, 3 parent_id, 'cat c' cat FROM dual UNION ALL
    SELECT 7 ID, 4 parent_id, 'cat a' cat FROM dual UNION ALL
    SELECT 8 ID, 4 parent_id, 'cat d' cat FROM dual        
SELECT
      p.ID parent_id,
      p.cat parent_cat,
      c.ID child_id,
      c.cat child_cat
FROM
    parent_acc p
JOIN
    child_acc c
ON
    (   c.parent_id = p.ID
WHERE
     c.cat != p.cat                 
/David

Similar Messages

  • Partial selection of child does not keep parent node selected

    Hi All,
    Please help! I have a checkbox JTree which is working fine in all regard as I want except one condition i.e. if all child(leaf) of a parent are not selected parent gets deselected i.e. if we uncheck any child(leaf) node parent will get unselected even if there are some child are selected. I am posing code for the model. let me know if I need to post other codes also
    tree.setModel(new DefaultTreeModel(rootNode1) {
        public void valueForPathChanged(TreePath path, Object newValue) {
            Object currNode = path.getLastPathComponent();
            super.valueForPathChanged(path, newValue);
            if ((currNode != null) && (currNode instanceof DefaultMutableTreeNode)) {
                DefaultMutableTreeNode editedNode = (DefaultMutableTreeNode) currNode;
                CheckBoxNode newCBN = (CheckBoxNode) newValue;
                //CheckBoxNode newCBN1 = (CheckBoxNode) newValue;
                if (!editedNode.isLeaf()) {
                    int i=0;
                    //for (int i = 0; i < editedNode.getChildCount(); i++) {
                      while(i < editedNode.getChildCount()){
                         System.out.println("child count root"+editedNode.getChildCount());
                         System.out.println("child count root i"+i);
                        DefaultMutableTreeNode node = (DefaultMutableTreeNode) editedNode.getChildAt(i);
                        CheckBoxNode cbn = (CheckBoxNode) node.getUserObject();
                        cbn.setSelected(newCBN.isSelected());
                        if(!editedNode.getChildAt(i).isLeaf())
                        for(int j=0;j<editedNode.getChildAt(i).getChildCount();j++)
                         System.out.println("child count roottt"+editedNode.getChildCount());
                         System.out.println("child count root j"+j);
                         DefaultMutableTreeNode node1 = (DefaultMutableTreeNode) editedNode.getChildAt(i).getChildAt(j);
                         CheckBoxNode cbn1 = (CheckBoxNode) node1.getUserObject();
                         //cbn1.setSelected(true);
                         cbn1.setSelected(newCBN.isSelected());
                        i++;
                else{
                    boolean isAllChiledSelected = true;
                   for (int i = 0; i < editedNode.getParent().getChildCount(); i++) {
                        DefaultMutableTreeNode node = (DefaultMutableTreeNode) editedNode.getParent().getChildAt(i);
                        CheckBoxNode cbn = (CheckBoxNode) node.getUserObject();
                        if(!cbn.isSelected()){
                            isAllChiledSelected = false;
                    if(isAllChiledSelected){
                        DefaultMutableTreeNode node = (DefaultMutableTreeNode)editedNode.getParent();
                          CheckBoxNode cbn = (CheckBoxNode) node.getUserObject();
                        cbn.setSelected(isAllChiledSelected);
                if (!newCBN.isSelected()) {
                    DefaultMutableTreeNode node = (DefaultMutableTreeNode) editedNode.getParent();
                    if (node.getUserObject() instanceof CheckBoxNode)
                        ((CheckBoxNode) node.getUserObject()).setSelected(false);
              /*if (!newCBN.isSelected()) {
                    DefaultMutableTreeNode node = (DefaultMutableTreeNode) editedNode.getParent();
                    if (node.getUserObject() instanceof CheckBoxNode)
                        ((CheckBoxNode) node.getUserObject()).setSelected(false);
    });

    Hi Thomas,
    Sorry for late reply due to weekend.
    I had already tried your suggestion but it is not working. Do not know why? here is the code.
    else {
      int countselection=0;
    int t=editedNode.getParent().getChildCount();
                   for (int i = 0; i < editedNode.getParent().getChildCount(); i++) {
                        DefaultMutableTreeNode node = (DefaultMutableTreeNode) editedNode.getParent().getChildAt(i);
                        CheckBoxNode cbn = (CheckBoxNode) node.getUserObject();
                        if(cbn.isSelected()){
                            countselection= countselection+1;
                    if(icountselection==0 ){
                        DefaultMutableTreeNode node = (DefaultMutableTreeNode)editedNode.getParent();
                          CheckBoxNode cbn = (CheckBoxNode) node.getUserObject();
                        cbn.setSelected(false );}
    else if(countselection==1 && countselection<=t)
    DefaultMutableTreeNode node = (DefaultMutableTreeNode)editedNode.getParent();
                          CheckBoxNode cbn = (CheckBoxNode) node.getUserObject();
                        cbn.setSelected(true );
    }}

  • HT5312 I forgot my security questions and when I ask to send them to me via email it shows a gmail account address, which does not match either address I have listed in the contact information.  What do I need to do to get this corrected?

    The rescue email address and how to reset apple ID security questions did not help me out, what now?

    See Here... ask to speak with the Account Security Team...
    Apple ID: Contacting Apple for help with Apple ID account security

  • Accounts Payable Reconciliation Account does not match with sap report

    Hello Folks,
    I have problem with AP reconciliation account, that the balances in FS10N for a particular Company Code for particular reconciliation account balance do not match with the report run to show the vendor  balances in local currency (report tcode F.98). Balance does not match for last posting period of the FY.
    I have tried looking all the vendors in that particular GL recon account and ran the report, but still it i wast able to find out anything. May be Special GL transaction posting be there, but how to check that is there any spl gl transaction it there in the recon account.
    I this to be solved by tonight, all the inputs will be very much appreciated and point will be assigned for sure.
    Thanks you all.

    Hi,
    In the report you have to G/L accounts where you can select on:
    The reconsilation account form the Vendor
    The G/L account where to posting is created on.
    It is possible that there are differences when you have change the reconsilation account form the Vendor.
    The old posting are on the old and new on the nwe account. Perhaps you mis some Special G/L Indicators
    It is possible that values are changed when you run the reports
    Paul

  • My icloud account on my new iphone does not match the user ID for itunes as it is an old apple ID. There is no password for this ID so I cant change it and it wont let me change the apple ID. Any help?

    my icloud account on my new iphone does not match the user ID for itunes as it is an old apple ID. There is no password for this ID so I cant change it and it wont let me change the apple ID. Any help?

    To change to iCloud ID on your phone you have to go to Settings>iCloud, tap Delete Account, provide the password for the old ID then sign in with the new ID.  If you don't know the password for the old ID, and if the old ID is an earlier version of your current ID, go to https://appleid.apple.com, click Manage my Apple ID and sign in with your current iCloud ID.  Click edit next to the primary email account, change it back to your old email address and save the change.  Then edit the name of the account to change it back to your old email address.  You can now use your current password to turn off Find My iPhone on your device, even though it prompts you for the password for your old account ID. Then go to Settings>iCloud, tap Delete Account and choose Delete from My iDevice when prompted (your iCloud data will still be in iCloud).  Next, go back to https://appleid.apple.com and change your primary email address and iCloud ID name back to the way it was.  Now you can go to Settings>iCloud and sign in with your current iCloud ID and password.

  • Aging Report does not match Balance Sheet Receivables/Payables Account

    Hi experts,
    I am requesting your help to find out why our customer receivables/vendor payables aging reports total does not match our balance sheet accounts receivable/ accounts payable account for the same period.
    I would expect
    Customer Receivables Aging Report Total = Balance Sheet Accounts Receivables Account
    Vendor Aging Report Total = Balance Sheet  Accounts Payables Account
    Thank you.
    Jane

    When you run the report with an ending/aging date in the past (like the end of last month), if you do not display BP's with zero balances, it will leave out BP's who have a zero balance AT THE TIME YOU RUN THE REPORT.  Some of them may have had a non-zero balance at the end of the month, but they will be left off anyway.  So if a customer owed money on the last day of the month and he paid it on the first of the next month, his balance will not be shown on the report if you run it even one day later.
    I feel this is a design defect in the report, but it is the system behavior.
    Marcia

  • Sales Analysis report does not match Cost of Sales Account

    My client is running SAP B1 8.81 PL 6.  He has set all items to standard costing method.  He has discovered that the difference between the Sales Amount and the Gross Profit amount on the Sales Analysis report, which should equal the Cost of Sales for the Items, does not match the Cost of Sales G/L account on the P&L report.  If you look at a sample of rows, the above difference divided by the quantity equals the standard cost of the item.  There are no manual journal entries that affect the COS account for the posting period that is being analyzed.  I cannot see any mathmatical difference or problem with the above analysis, nor can I find the problem.  There is about an $85K difference between the reports.  The Sales Amount on the Sales Analysis report matches the revenue account on the P&L to the penny.  Has anyone ever compared these 2 reports?  Thank you for your help.
    Bill Turek

    If you right click on an Invoice and choose "Gross Profit" it will give you a setting on how you want to calculate the Gross Profit for that invoice.
    In the accounting point of view the "Base Price" should be "Item Cost" so that the Gross Profit will be (Net Selling Price - Item Cost = Gross Profit). This will give you the same Gross Profit amount between P and L and Sales Analysis Report.
    However, SAP B1 gives the user the ability to select a different base price other than the Item Cost.
    This gives the user the flexibility for the Sales Report. Example (Net Sales Price - Vendor Sales Price = Gross Profit). People do this sometimes because  the item's cost fluctuates if you use FIFO or average cost and they want a uniform cost to calculate their Gross Profit.
    In summary if the Base Price is not set to "Item Cost" then there will be difference in the Gross Profit between the P and L and Sales Analysis Report.
    See screenshot:
    -Eric Alo-
    B1 Financial Consultant

  • Can not view cellular data account any more (email address does not match)

    On iPad, was originally able to go into Settings > Cellular Data > View Account and view the account info. Now cannot. If try using correct email address and password, get message that account or password are incorrect. If try entering just the email address and clicking "forgot password", get "the email address you entered does not match the email address on file for this device".
    But the 3G cellular is still working.
    Don't know if related, but this problem began after the reports of the 100,000 iPads/users hack. Leads me to wonder if I got hacked.... or more likely if the system/database that "View Account" normally accesses is offline or being reworked by AT&T.
    Any suggestions? Best AT&T contact via Internet? By phone #? By local AT&T store? Via Apple? Use iTunes to reset to factory defaults and start over (risk loss of unlimited plan?)?.
    Thanks.

    Thanks for the replies, I just had the same problem yesterday and it was a misspelled e-mail address, BUT, it did take me three calls to AT&T and more than two and a half hours. The first person didn't even know what I was talking about and gave me a number for iPad support which turned out to be Apple's, so... no help. The second person told me they were there only to solve iPhone problems until I read her your posts, then she tried and tried until the call was cut off (this is AT&T after all). But the third person finally understood, even though it took her almost an hour to get to their iPad support department (she told me it was busy all the time) not before trying with their "technical department" also. I just can't believe that Apple sells millions of these things and AT&T can't supply a direct phone number for this department, or doesn't even train their personnel.

  • GR/IR account G/L balance does not match with BSIS table

    Hi,
    I am preparing a report which uses table BSIS.But the total in the table does not match with the GR/IR G/L balance account.When I click on balance item display in FS10N the entries match with that of BSIS but the total is different.Also how to factor the year opening balance entries in the report.
    Thanks
    Arun

    But that will slow down the system considerabley, because BSEG contains a huge data

  • Message no. F5350 account type/account for invoice reference does not match

    Hi SD Experts
    Getting error message when the Billing document is released to accounting.
    "Message no. F5350 account type/account for invoice reference does not match item"
    Client is having 6.0 version , I have checked OSS notes, only available for upto 4.7 version.
    Please help to solve this issue.
    Thanks/karthik

    have you checked which account type is maintained in respective G/L account which supposed to be hit once invoice is released . eg: check in Reconcilation account assigned in Customer Master in FS00, Reconcillation account for accoun type should be - D= Customers.
    similarly for other accounts such as "Revenue account"  & check Field status group assigned in G/L account in FS00.
    Check & revert

  • HT1933 I have old email address's I used for iTune music purchases and cannot change password on several old accounts. Now some of the music I purchased I can not download and authorize it on my device. What can I do password security does not match my bi

    I have old email address's I used for iTune music purchases and cannot change password on several old accounts. Now some of the music I purchased I can not download and authorize it on my device. What can I do password security does not match my birthdate on two of the accounts. Apple can not send me email with a password authorization on several current accounts that I have with them. How can I contact Apple with this annoying problem I can not fix.

    settings - app/iTunes store - sign out and sign back in with your new id.
    Note - if your older apps needs an update it will use your old apple id and password, as Apps are tied to the apple id that was used to purchase it.
    You can't merge apple id.

  • Ok... i am trying to sign into my apple account in the itunes store on my ipod and i have all the correct data for my credit card and it says " your payment information does not match your banks records. try again or nenter a new payment method. " help me

    ok... i am trying to sign into my apple account in the itunes store on my ipod and i have all the correct data for my credit card and it says " your payment information does not match your banks records. try again or nenter a new payment method. " what does this mean and how can i fix it??

    - See:
    ]iTunes Store: My credit card's security code or zip code does not match my bank's records
    - If still problem contact iTunes by:
    Contact iTunes

  • Getting Error message ""This set top box does not match the account settings"

    Just ordered a new wireless receiver for the bedroom. Installed it and now getting the following error "This set top box does not match the account settings". Service was suppose to be enabled on Monday the 4th, but I recieved the hardware early and turned it on. I've since rebooted and unplugged and tried everything to no avail. Any thoughts on how I might get this to work? Regards,  Rick

    your wireless receiver is misconfigured (dirty) and need to be scrubbed clean.
    A tech (service visit) or tier 2 rep (phone or chat) can do this. The receiver needs to be unplugged, on the bottom of receiver is a GUI (long number) that will be needed to identify receiver, when instructed plug just the receiver in that gave number for, when that one is connected.
    Your choice 4 hour appointment window, or time on phone , or chat.
    If these have not been activated yet.... When screen comes up, depress OK on receiver, depress button on WAP, when the screen at receiver says try again, Depress OK button (remote or on stb) another screen for update, depress OK give about 10 minutes to load, reboot when checking depress menu to verify recordings, if no recordings menu not finished booting.
    Set aspect ratio MENU, OPTIONS, etc.
    should take about 20 minutes per receiver.

  • Inventory in warehouse report value does not match balance sheet account

    Dear experts,
    When I run the inventory in warehouse report, the value (using last purchase price) does not match the inventory finished goods account. Can you please advise why?
    Thank you for any advice.
    Jane

    Dear Jane,
    The only report for inventory to link to financial statement would be Inventory Audit Report.
    All other reports are just for your convenience. They are not financial based.
    Thanks,
    Gordon

  • Account currency200114 does not match document currency(1)

    Hi
    While adding A/P invoice i receive error:
    Account currency200114 does not match document currency(1)
    my bp currency is in USD and local is INR
    Plz solve it.

    Found.Thanks.
    Edited by: Malhotra Saurabh on Jul 30, 2009 11:28 AM

Maybe you are looking for

  • 16 Bit Audio Values

    Hi everyone. I posted this in the Java Sound area a week ago but never got any responses. Its a bit important so forgive the double posting. 16 bit signed audio has short values (-32,768 to 32,767) where im assuming 0 = silence (the zero crossing). D

  • Magic updates

    Hi I have a problem with service updating records in SQL Server according to data picked up from aq adapter. ESB console shows that all operations are successful, payload of the message looks decently too but updates don't take place. How to track th

  • Changing the appearance of all my pages

    Hi, I would like to revamp my site and would like to change all of my pages from a black background to white and change the logo and image next to it to a new design I have created. Can I do this on one page then apply to the rest or does it have to

  • Can't set up Verizon Messages

    Installed Verizon Messages on my Windows 8 computer. Received the security code via text, entered it, and was greeted with this message: Only once did I actually see the Message+ window on the left. Every other time I've tried this it's immediately b

  • Export Chapter Markers in Quicktime to iDVD

    I know that when you export a movie from iMovie as a full quality QT, the chapter markers aren't included (why they changed this i'll never understand). However, i was wondering if someone could point me in the direction of an article or posting that