Reg status flag

I have the following requirement
I have 2 tables person and percarrear
i have the common feild per_id in both tables i want to check the records based on 2 things 1 is per_id(only per_id) and other is org_id(per_id,org_d).I want the out put as follows.
My requirement as follows..
If per_id,org_id exists in both table status as 0
If per_id,Org_id exists in either table as status as 1
If both are doest exists status as 2
The sample output as follows
Per_id     org_id     status
100     null     1
200     156     0
null     null     2
give me the complete query ASAP

You can use CASE
with t_data as
select 100 as col1,null as col2 from dual union all
select 200, 266 from dual union all
select null,null from dual
SELECT
     col1,
     col2,
     CASE
          WHEN col1 IS NULL
          AND col2  IS NULL
          THEN 2
          WHEN
                    col1    IS NOT NULL
               AND col2 IS NULL
          OR
                    col1    IS NOT NULL
               AND col2 IS NULL
          THEN 1
          ELSE 0
     END as col_status
FROM
     t_data;
      COL1       COL2 COL_STATUS
       100                     1
       200        266          0
                               2
user11384749 wrote:give me the complete query ASAPTry to avoid using such statements in public forum. People might get irritated.

Similar Messages

  • How to check the value of "The Interrupt Status Flag"?

    Hi, thank you for reading this post!
    Invoking Thread.interrupt() sets the value of the Interrupt Status Flag.
    Just wondering if there is a Java method to check the value of this flag? Or is using isInterrupted() or interrupted() the only way to check?
    http://download.oracle.com/javase/tutorial/essential/concurrency/interrupt.html
    Thank you in advance for your help!
    Eric

    Below is the full code. As soon as the Thread.sleep() is taken out in main(), the interrupt is detected in the child thread. But if the sleep() stays, then the child thread goes into an infinite loop. It's not detected the interrupt.
    //ParentInterruptChildThreadCatchedDemo.java
    //Program function: This program demonstrates the parent thread (main()) interrupting a child thread (thread1).
    //Threaded class
    class TryThread extends Thread {
         //fields
         private String threadname;
         private long aWhile;
         //Constructor
         public TryThread(String tname, long delay) {
              threadname = tname;
              aWhile = delay;
         //run() method
         public void run() {
              while(!Thread.interrupted()) {
                   //Do work
              try {
                   System.out.println(Thread.currentThread().getName() + " was just interrupted!");
                   throw new InterruptedException();
              } catch(InterruptedException e) {
                   //System.exit(1);
                   return;
    public class ParentInterruptChildThreadCatchedDemo {
         public static void main(String[] args) {
              Thread thread1 = new TryThread("thread1", 2000L);
              thread1.start();
              try {
                   System.out.println("main() goes to sleep for 10 second.");
                   Thread.sleep(10000);
                   System.out.println("Statement after main() sleep().");
              } catch(InterruptedException e) {
                    e.printStackTrace();
                 //Interrupt thread1
                  int interruptFlag = 5;
                  for(int i=0; i<11; i++) {
                       if(i == interruptFlag) {
                            System.out.println("Condition met, going to interrupt thread1 ...");
                            thread1.interrupt();
                            System.out.println("Thread1 interrupted!");
                  System.out.println("Ending main()");
    /*Output:
    main() goes to sleep for 10 second.
    Statement after main() sleep().
    Condition met, going to interrupt thread1 ...
    Thread1 interrupted!
    Ending main()
    INFINITION LOOP
    */

  • Physical Inventory Status Flag Not Reset after Year End Inventory Procedure

    Hi,
    We are just done with the Year End Inventory Procedures, and to my surprise, a lot of Storage Bins are having their Physical Inventory status flag as ACTIVE, which they should not have.
    An example bin has incorrect status-u201Ccountedu201D in the associated inventory record number . LINV status is L-cleared. LINK status is Z-counted, LINP status is Z-counted and physical inventory flag is ON in table LAGP, but status must be L-cleared and physical inventory flag should be OFF (or blank) in table LAGP.
    Our users did not use LI20 to clear the empty bins or bins had no difference to post (meaning book qty & count qty are the same).
    I already tried the Program RLREOLPQ and OSS Note 824904, but no its of no use in our Case.
    Any guess/hint for the problem?

    I solved this with thehelp of a Zprogram writeen wrt the OSS note mentioned above in the question.

  • Status flag green for asyncronous scenarios

    Hi  all,
          In my practice system, I have changed the date( before 2 weeks). then all asynchronous scenarios have not been working. If i checked status flag it was showing in SXMB_MONI as green flag.
      Please help me from this problem.
    Regards
    Deviprasad.

    Green is Shceduled for Procesing.
    There are message stuck in the Queue.
    Go to the Queie Id of the message in MONi, click on it and navigate to the last entry and delete the message that is holding the queue.
    Now, deactivate / delete the queue and activate it again and restart these messages.
    Regards
    Bhavesh

  • Status flags in TOC not setting

    Hi,
    I just recently created a project with a table of contents. There are a number of click boxes and 'continue' buttons that pause the project. Sometimes, even though the project has moved on from the slide, the status flag is not set in the TOC. Sometimes it does work though. This is encountered by all users with this project.
    Suggestions?

    Hi there
    I think you may be encountering the following situation.
    If you have a Click Box or Button object that is left at the default action of "Continue", the playhead continues to advance and it reaches the slide end. Once it reaches the slide end, the flag is set to indicate the slide has completed.
    If you change the default action from Continue to "Go to the next slide" or perhaps "Jump to slide", the playhead never really reaches the end of the slide. So Captivate doesn't consider the slide to have been "visited".
    Thoughts here are to possibly stage the Buttons or Click boxes so they pause at the actual end of the slide? Then Captivate may consider the slide to have been viewed and set the flag accordingly. Perhaps try that.
    Cheers... Rick
    Helpful and Handy Links
    Captivate Wish Form/Bug Reporting Form
    Adobe Certified Captivate Training
    SorcerStone Blog
    Captivate eBooks

  • Polling on status flag using Informatica

    Hi Informatica guru's
    how can Informatica workflow do polling (10 attempts MAX) on the status flag of a particular table at a fixed time interval of every 5 minutes.
    On the 10th Attempt ,if the status is still not yet changed ,then the Informatica workflow to be marked as failed.
    later an email to be sent about the workflow failure.
    how do I develop the above logic?
    please help me ASAP.
    Thanks & warm regards,
    Kam

    did you ever figure out how to do this? I need to do the same thing.
    Thanks,
    Angie

  • Clearing Table of Content status flags on file launch??

    I have a trainin course with the Table of Contents feature (Captivate 4), which displays what screens the user has viewed by displaying green status flags. Our customer may have a workstation set up as a “training station”. It appears as though the status flags in the TOC is cumulative. In other words, of one student comes in, completes the training, and then another student comes in behind him to use the training, all the status flags from the previous training session are still visible. So, my question is…Is there any way to control the status flags without each user having to manually clear them using the clear button? Possibly with a variable of some sort? Any suggestions would be greatly appreciated!

    Hi there
    Have you tried clicking Project > Table of Contents > Settings... and ensuring the Status Flag option is cleared?
    Cheers... Rick
    Click here for Adobe Certified Captivate and RoboHelp HTML Training
    Click here for the SorcerStone Blog
    Click here for RoboHelp and Captivate eBooks

  • Status Flag not appearing if branching

    I have a CP project with branching after a question slide (slide 14).  If the user gets the question wrong, they follow an alternate path to slide 15 to review the correct answer.  Then they hit slide 16.  If they get the question right, they skip slide 15 and hit slide 16.  The user who gets the question right will never see slide 15, thus making the TOC think they didn't see all the slides.  The TOC will not mark the module as complete with a status flag.  Help?

    Hello,
    TOC can help users by marking slides as seen. But you have to be aware that only slides that are completely viewed will get the status flag. It is also great for self paced learning, for navigation. From your question I understand that you want it to take over the role of a LMS: completion of a course is normally reported by the LMS. Even there a branching in a course will cause problems if you want to have a Completed status reported. For a LMS you could indicate which % of slides have to be watched.
    What do you really want to achieve with the TOC? Perhaps it could be realized with some variables and advanced actions.
    Lilybiri

  • Error :  Business partner has status "Flagged for Archiving"

    Hi All,
    I have error in order: Business partner (Sold to Party) .has status "Flagged for Archiving"
    I removed the Click "Archiving Flag" from BP and I changed the order.
    But still error is not going.
    Can somebody suggest what to do for removing this error?
    Regards
    Jay

    Hi Jay,
    Follow these steps :
    1. Go to Transaction BUPA_PRE_DA.
    2. In the relevant fields, enter the BP number, mark the radio button for 'To be archived' , check the 'Reset Flag' check box.
    3. Uncheck the 'test run' check box.
    4. Execute.
    This will reset the archiving flag.
    Hope this solves your problem.
    Cheers,
    Rishu.

  • Captivate TOC edit status flags

    With Captivate 8, the status of a question that is not answered is still marked as viewed. I would need to know if there is a way to edit how those status flags work. If not, can I create my own TOC to set status flag as I prefer?
    I would like to have a TOC to flag all slides not viewed with a red flag and then remove the flag after they viewed or answered the question. If that's not possible at least to show which questions were answered with a checkmark, not viewed.

    Hi Again,
    I just looked at your link and don't think that will help.
    The course is actually a 110 random question course. It requires free navigation to go forward and backward and should show which questions were not answered.  It's not based on chapters.
    Thanks again!
    Laura

  • Reg.exe FLAGS command not working in 32bit environments

    I am trying to run the command REG FLAGS "hklm\Software\SomeKey" SET DONT_VIRTUALIZE and each time I run it on a 32bit version of windows 7 in our environment I get the help screen. Even if I put in a bad path instead of getting a message
    that the path was wrong I get the help screen.   When I run it on my computer (Windows 7 64bit) it works as expected.
    It does the same thing when I try REG FLAGS "hklm\Software\SomeKey" QUERY.  Its like the 32 bit version doesn't know what FLAGS is although it is present in the help screen.
    Ideas?  Suggestions?  Recipie ideas?

    Hi Beast of Burden,
    I have tested the reg flags in my Windows 7 32 bit Enterprise and it can run well .
    Please note that the REG FLAGS can only be appiled to the "HKLM\Software"[\SubKey].Have you verified that the subkey existed in the 32 bit machine ?We can try the other subkey to have a check for example the "classes" subkey.
    Best regards
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact [email protected]
    I understand about the HKLM\Software restriction and I have limited my testing to that key (and sub keys). As I said, when I enter a valid key it does nothing but show me the syntax screen.  Generally while I am testing I am using the REG FLAGS <key>
    QUERY command. 
    When I am on a machine where the command is working correctly, I will either see the flags for the eky specified or a message saying that the key was invalid (should I intensionally try a bad key).   On machines where it is
    not working I always see the syntax screen regardless if the key existed or not. 
    I am wondering if there is a patch or registry key that controls this behaviour.

  • Include the Content Released status flag in default WC data control

    Hi,
    We have integrated custom webcenter portal application with UCM for documents integration. The integration was done using default data control.When we change the document which is getting displayed in the portal from UCM and check it into the system, wokflow gets triggered properly and the content status shows review status. But when we access the document in the portal, at that point of time new document is visible even though the content is still not released from the system.
    Can anyone of you let me know how to include the released status of the content in the default data control so that we can avoid this situation
    Regards,
    Boopathy

    First of all, I think this is more a question to WebCenter Portal, because it is how WebCenter Portal components are written.
    Another thing is, that this is probably 'works as designed' and there might be good reasons for that. Since PS3, WebCenter (Portal) exposes some of UCM's functionality, among them ability to approve items in a workflow. This is the reason why it makes a good sense that items are available. Of course, they should be available only to approvers; also unapproved items should not appear if an item is displayed via Content Presenter (compare to a document published on a website via WCM). If you found such a behaviour, please, report it to MetaLink as it might be a bug.

  • Reg: Status 30 in We02

    Hi All,
    I have written an ABAP program in se38 for the updation of data in my Ztable. In my program immediately after INSERT statement I have written code for the population of the Idoc and COMMIT WORK statement after the MASTER_IDOC_DISTRIBUTE function module.
    After the execution of the program the status is going to 30 and when I run the program RSEOUT00 the status is changing to 03. I have selected the radiobutton process immediately also in the Outbound parameters.
    Can anybody help me in this regard.
    Thanks,
    Khan.

    Hi  Ahmed ,
    Please check your IDOC in TCODE SM58. if there is a problem T-RFC , It may ended with error in SM58 . try to fix the same.
    if there is no error , execute it from SM58.
    Please refer the below link as well. Clearly mentioned How to trouble shoot and correct the same.
    [http://wiki.sdn.sap.com/wiki/display/ABAP/IDoc+Statuses]
    Edited by: Prasath Arivazhagan on May 31, 2010 12:44 PM

  • INACTIIVE STATUS FLAG IN SMQS/SMQR

    Dear Guys
    I am seeing Status as Inactive in SMQS and SMQR Between CRM server and R/3 Server
    but for the same if i do test connection it shows no problem.
    can anyone explain whether INACTIVE status in SMQS/SMQR having any relevance.
    rgds
    BJ

    Hi Shalini/Jagan,
    I'm facing the same status in tcode SMQS. Could you please explain on this scheduler status.

  • Reg: Status of the SC

    Hi SRM Gurus,
    Can any body give the inputs for Status of the SC.
    Currently using N-step Item level approval process
    when SC changed & Approved by the first Approver the WI send to SC creator but status of the SC is showing in Approval preview "To be approved by" second approver.
    My requirement is custom SC status  as "SC WI with Shopper for Acceptace or Change"  in Approval Preview.
    Is there any Oss Notes on SC status and Monitor SC.
    Thanks in advance
    Edited by: CK on Mar 4, 2009 3:00 PM

    Hello,
    you had to change some texts in BBP_ICON_TEXT
    In transaction se80:
    - workbench -> edit object -> More ...
    - click on Message Class
    - Put in BBP_ICON_TEXTS
    - Click on Tab "Messages"
    here you see the texts which are used by the system. You can modify them as you want.
    Regards,
    Daniel

Maybe you are looking for

  • 4 audio channel from FCP to miniDV

    Hi There I have to print a tape from FCP with 4 audio channel but don't know how to do it. Does anyone know? Thank you.

  • Cast in oops

    what is cast? what is narrowing cast?what is widening  cast?what is ME? plz explai me with good examples.

  • Openings at Pune and Chennai

    We are Srishtii Info Inc, an IT Services company based out of Hyderabad. We are having clients for whom we provide HR services in Hyderabad, Pune, Mumbai, Delhi, Chennai besides other locations in India. We require the following profiles for our clie

  • Call centre staff paying for plastic cutlery???

    Good god....I know exactly where they could stick their plastic fork! It never used to be like that at o2. I wonder how many leave for work in a morning...keys-check, wallet-check, phone-check, knife and fork-check......

  • Safari & Software Update crash after installing latest Security Update

    I recently loaded Security Update 2008-007 and now Safari crashes on trying to open. I've also found Software Update crashes. Trying to reload Safari and the downlaoad crashes. I'm running 10.5.5 on my G4 12" Powerbook. Any suggestions, before I perm