Problem with the query operation using less

Hi all

I have the dataset of all organization numbers like as below

DataSet:

('528801', '528802', '536101', '536102', '100601 ', '536401', ' 536402 ', ' 530701',' 536501', ' 536502 ', ' 540501',' 599101 ', ' 133301',)
('531101', '143101', '536601', '536602', '534401 ', '535501', ' 535401', ' 536801 ', ' 536802',' 531001 ', ' 537501',' 537502 ', ' 540601',' 540801 ', ' 528401')

And I also have a W_INT_ORG_D table where in a column like ORG_NUM that contains the figures of the Organization in the database, now I'll try to find the numbers of the exclusive organization in the value data that does not exist in W_INT_ORG_D using an oracle sql query.

Here is the sql code I wrote well that my request is wrong you could probably understand what I'm trying to say or do, I'm not ok with creating another table and filled in the data and compare two tables later, I want to do it without creating any additional table. Please let me know if you have an idea to do this, appreciate your time.

Request:_
WITH ABC AS
('528801', '528802', '536101', '536102', '100601 ', '536401', ' 536402 ', ' 530701',' 536501', ' 536502 ', ' 540501',' 599101 ', ' 133301',)
('531101', '143101', '536601', '536602', '534401 ', '535501', ' 535401', ' 536801 ', ' 536802',' 531001 ', ' 537501',' 537502 ', ' 540601',' 540801 ', ' 528401')
SELECT DISTINCT ORG_NUM
OF W_INT_ORG_D, ABC
WHERE DATASOURCE_NUM_ID = ' 211 '.
AND ORG_NUM IN
('528801', '528802', '536101', '536102', '100601 ', '536401', ' 536402 ', ' 530701',' 536501', ' 536502 ', ' 540501',' 599101 ', ' 133301',)
('531101', '143101', '536601', '536602', '534401 ', '535501', ' 535401', ' 536801 ', ' 536802',' 531001 ', ' 537501',' 537502 ', ' 540601',' 540801 ', ' 528401')
LESS
SELECT * FROM ABC
Thank you
Sam

This wil give a list of numbers of overall organization of data that are not present in the view:

 SELECT column_value org_num
   FROM TABLE(sys.odciVarchar2List(
                                   '528801',
                                   '528802',
                                   '536101',
                                   '536102',
                                   '100601',
                                   '536401',
                                   '536402',
                                   '530701',
                                   '536501',
                                   '536502',
                                   '540501',
                                   '599101',
                                   '133301',
                                   '531101',
                                   '143101',
                                   '536601',
                                   '536602',
                                   '534401',
                                   '535501',
                                   '535401',
                                   '536801',
                                   '536802',
                                   '531001',
                                   '537501',
                                   '537502',
                                   '540601',
                                   '540801',
                                   '528401'
                                  )
             )
MINUS
 SELECT  DISTINCT ORG_NUM
   FROM  W_INT_ORG_D
   WHERE DATASOURCE_NUM_ID='211'
/

SY.

Published by: Solomon Yakobson, June 29, 2009 10:49

Tags: Database

Similar Questions

  • Laptop G60-549DX (with OS Windows7-problem with the microphone when using Skype)

    Just bought a laptop G-60-549DX. His mic is BAD. Voice of cuts to when using Skype. Help!

    I was able to solve the problem with the microphone on the G60-549DX when using Skype.  I spend up to 6-8 hours, talk with convenience stores of HP.  They were very friendly and helpful.  The same help a friend.  My friend downloaded updated bios and micro drivers.  HP technician asked me to turn off the laptop, then remove the battery, unplug the power cord. With battery removed and stop, I pressed the market / off power button for a good minute evacuate remaining power into the computer. When I restarted the laptop I micro worked. I did a little more fine-tuning of the installation of the microphone.  Now, it works well on Skype and sound recorder. I won't take this back within the 14 days return policy.  It's a good computer I can say.  The technicians were all very friendly and helpful.  They called me several times to check to see if it still works OK! They are HUGE!  They want to help with any other question, I have perhaps with the computer.  Thank you very much for the help. Everyone was SO helpful.

  • Seeking help with a problem with the LR I use LR CC on a laptop, when you try to export a picture to an external hard drive, I am now without apparent reason to get the following message, "could not create a JPEG sponsor limit you 92 k Bytes.Plea.

    Seeking help with a problem with the LR


    I use LR CC on a laptop, when you try to export a picture to an external hard drive, I am now without apparent reason to get the following message.

    "Could not create a respondent JPEG limit you 92 k Bytes.Please increase the size limit files
    . (1).

    .....

    I tried to increase the size of the file several times,

    I left LR

    I restarted the computer.


    Any help or advice for this problem will be greatly appreciated


    Thanks in advance


    @stu

    Not because of the number of pixels, in this photo and the chosen level of quality there is no possible way to create a JPG file to the size of file you requested. You must change your export settings.

    Show us a copy of the export dialog box, so we can see clearly the part file setting and the size of the Image.

    Also indicate the number of this image (width and height) pixels after cropping (as appropriate) and prior to export.

  • Problem with the compilation by using the new compiler (Compilation failed during execution: compilation-abc)

    Hello

    Since the release of the fast compiler, I experienced problems with the compilation of the version release with it.

    As it was still in beta, and since it was still possible to use the legacy compiler, I chose to use the legacy compiler each time (especially since it was more stable).

    With this 64-bit iOS requirement came into play on February 1, the legacy compiler is no longer available because it has been completely removed from AIR 16 (and all future versions).

    Now, I can no longer compile release versions (debug versions are works well) because I have the following error every time:

    Error occurred during the application of packaging:

    Stack dump:

    0 program arguments: C:\Program Files\Adobe\Adobe Flash Builder 4.7 (64 Bit)\eclipse\plugins\com.adobe.flash.compiler_4.7.0.349722\AIRSDK\lib\aot/bin/compile-abc / compile - abc.exe - mtriple = armv7-apple-ios - filetype = obj - sdk C:\Program Files\Adobe\Adobe Flash Builder 4.7 (Bit)\eclipse\plugins\com.adobe.flash.compiler_4.7.0.349722\AIRSDK\lib\aot/lib/avmglue.abc 64-fields C:\Program Files\Adobe\Adobe Flash Builder 4.7 (64 Bit)\eclipse\plugins\com.adobe.flash.compiler_4.7.0.349722\AIRSDK\lib\aot/lib/air-fields.)) arm-air.txt-O3-ane-symbol = MmgCmApiExtInitializer - ane-symbol = MmgCmApiExtFinalizer - ane-symbol = MmgRbApiExtInitializer - ane-symbol = MmgRbApiExtFinalizer - ane-symbol = MmgStoreKitApiExtInitializer-ane symbol = MmgStoreKitApiExtFinalizer-ane symbol = MmgGoViralApiExtInitializer-ane symbol = MmgGoViralApiExtFinalizer-ane symbol = MmgGaApiExtInitializer - ane-symbol = MmgGaApiExtFinalizer - ane-symbol = MmgGAIDFAAccessApiExtInitializer - ane-symbol = MmgGAIDFAAccessApiExtFinalizer - ane-symbol = AFExtensionInitializer - ane-symbol = PushwooshExtInitializer - ane-symbol = PushwooshExtFinalizer elease-temp\AOT\AOTBuildOutput4982262150932522887.tmp\ABCFilesList.txt-abc-file-list=C:\BingoIslandWeb\Client-branch-1.06.05\BingoIslanMobile\BingoIsland\bin-r

    Compilation failed during execution: compilation-abc


    I tried to pin-point the source of the problem leaving specific things in the code, while removing all the rest,

    But so far, all I could find is that he has a problem with the classes that extend EventDispatcher.

    Anyone encounter this problem and knows how to work around it?

    Thank you!



    I had this problem also with other things. It was difficult to solve. Remove all const and var conversion in the Document class solve my problems

  • problem with the query insert masking character @.

    Hi the gems...

    I do through xml schema, run... means using a batch file, I'll call the xml files and the xml file contains the names of files containing all the DDLs and LMD...

    No problem with the DDL...

    now when I run the LMD, all are working well except a few insert scripts...

    Insert into TABLE_NAME (EVENT_ID, EVENT_DESC, EVENT_MESSAGE_TEMPLATE, EVENT_MESSAGE_SUBJECT) values (4, 'abcdefgh',)
    'Hi,
    Order details:
    @Order_ID #.
    @Instrument_ID #.
    This is an automated email. Please do not reply.',
    "executed");

    This kind of scripts insert failed with the error "[ora: sqlplus] SP2-0310: could not open the file" Order_ID #, .sql.

    This problem is due to the @ character before the data...

    problem doesn't happen when I run the script explicitly, xml perform only the origin of the problem

    So, I need to know if there is a way to hide the sign @...

    Please help... Thanks in advance

    user12780416 wrote:
    "[ora: sqlplus] SP2-0310: could not open the file" Order_ID #, .sql.

    In SQL * more the @ character means: run a script. That would explain the error message.
    The real problem is that your chain is written on several lines. A string like this might work:

    {code}
    Insert into TABLE_NAME (EVENT_ID, EVENT_DESC, EVENT_MESSAGE_TEMPLATE, EVENT_MESSAGE_SUBJECT) values (4, 'abcdefgh',)
    "Hi," | Chr (10)
    ||' Order of details :'|| Chr (10)
    |' @Order_ID #' | Chr (10)
    |' @Instrument_ID #' | Chr (10)
    ||' This is an automated email. Please do not respond. »
    "executed");
    {code}

    But it might not be a usable workaound.
    As you create the string insert sort, you might be able to replace all line breaks in the present with you own custom lines.

    Replace (yourEventMessage, Chr (10), "' |) Chr (10): "')

  • Performance problem with the guest operating system

    Hello gurus - I have one of the most unusual questions, I ran into a few time.   Here it is:

    I have a guest w2008R2 OS - installed in a 5.1 version of VM 7 vSpherer - which has an Emulex LPe 12002-E 8 GB dual HBA port is assigned to the as 2 PCI (1 device per port) via DirectPath devices

    The guest operating system has an application that performs backup tests.   WWPN of the HBA is zoned in the fabric and declared in the interface of Compellent Storage Center and everything is good here. the application creates a replay of a volume, mount it as a drive, read all the blocks, then dismantles and moves then repeat the process with what ever additional volumes should be safeguarded.   It is so cool I have do this with a VM right and not a physical host?  (would be cool if I had work NPIV but that's another story, not with technology HBA vendor support...)

    So, what's the problem?   Well, the bed the mounted disk backup will work extremely slow as slow as 5MB\sec flow, then during any other activity takes place on the system the flow jumps up to 150MB\sec all of a sudden and will continue to run fast for a long time and finish jobs on time with each work taking a little more than an hour.  But when the slow going the same work (all jobs are the same, they are simply by reading all the blocks of a bunch of 200 GB volumes and wrote a set of NULL value, do not forget this is just test) takes up to 10 hours to complete.

    I think that what is the culprit?   POWER MANAGEMENT.

    I have just about each performance counter and the journal of events known to man and I don't see anything abnormal on the table, ESXi virtual machine, nothing.  But what I see in the newspapers is any kind of activity that could happen in a transparent manner to save energy.

    FACTS on this case:

    -Reservation of memory is defined (it must be for directpath otherwise, you can't power on the virtual machine)

    -Booking CPU - has not been defined before an hour ago, I gave her just a small reserve for this rule, so I do not know if this will help alleviate the slow flow, or have an effect on what I think is a question of power (unit linked) management

    -windows power management is set to high performance never-ever - but not until an hour there doesn't I changed advanced settings for USB Disabled------turned off.  PCI peripheral energy saving setting was already off.  Which is in contradiction with my theory.  But maybe, just maybe, something is broken somewhere, or could be a bug... blah blah blah

    -the HBA, Emulex, as it appears in Device Manager in the guest OS doesn't have a power management tab to disable the feature, I don't see that the adapter VMXNET3 had this tab, and I turn off the power save setting to be conservative, do not think that it was the culprit, but as there is no real data running through the NIC.  The data is simply to be read from the disk mounted, not copied on any wire Ethernet.  never the less, in the Emulex properties is a Details tab and a selection of power data, and performance data indicate you what power mode, the device is, as well as feeding supported systems.  D0: full power, but D3, which shows as supported by the device, is an energy saving mode.   I could not yet attend the setting at the time of slow activity, my good intention as soon as possible. He is currently shooting in D0, full power.

    This is so what I have to offer on this, I hope that its just...   If I'm missing something, or if others have experienced this massive loss of unknown flow without reason and have resolutions, please share.

    If there is a way for me to disable power on the Emulex HBA management inform you please, I don't mind if I stop to enter the firmware, if that was even possible.  But if possible I would disable it immediately before any new tests are executed.

    The root cause of this issue has never been identified by VMware support which for me is a question of ugly.  Reservation of CPU for the VM using directpath IO with HBA installed in it corrected the problem.  I'd be leary with direct path IO.

  • HP Photosmart 6520 and problems with the air IPAD using IOS 8.0.2

    Used APPLE IOS 7. No problem with printing to the 6520. Now, I've updated to version 8.0.2. now, to get a message on the IPAD, saying: 'no printer not found '. No printing from laptop to printer and no problem shows on laptop as the printer selected in the folder devices and printers. Y at - it an update of software of HP to run version 8.0.2. .

    JERENDS, thanks for your response. I had already tried the "hard restart" at the suggestion of the Apple Tech Help, but that doesn't seem to help. But late last night after posting my question Imtried print again and IPAD are my printer without problem. Why he couldn't find yesterday morning but has been able to find it later in the day is one of the mysteries of life, I guess.

  • Problem with the query in the form of customization mode

    Hi all

    Can you please help me I'm getting problem while doing the customization form

    Scenario:

    Marter dot org form that I need to display the default value in the field of the unit of MEASURE value is null

    I succeed while doing all the steps below

    Condition tab:
    ----------------------
    Trigger the same: ONCE - NEW - ITEM - INSTANCE
    Trigger object: MTL_SYSTEM_ITEMS. INVENTORY_ITEM_MIR

    Action tab:
    ------------------
    Type: property
    type of object: agenda
    Trigger object: MTL_SYSTEM_ITEMS. PRIMARY_UNIT_OF_MEASURE_MIR
    Property name: VALUE
    Value: null

    but the problem is when I try to query (F11) the form, I'm not able to ask please help me with the of this

    Thank you
    EABR

    The problem is, you assign a value to an element when the form is opened, so the form will update mode, so the system not allowing you to make the request (f11). If you clear the value that has been missed, you'd be able to F11.

    So instead set the VALUE, try the INITIAL_VALUE property and let me know if this worked for you.

    Thank you
    Pradeep

  • VMWARE Newbie - installation problems with the guest operating system

    I heard a lot about the use of VMWARE for a long time so I downloaded and then installed ESXI 3.5 on a test area.  I installed the client and have been able to create a new virtual machine.  However, I run into some difficulty with installing a guest operating system.  All the pdf that I could find have suggested that simply by putting a CD in the server's drive and then turn on the virtual machine would start the my guest operating system installation process.  Unfortunately, my VM doesn't seem to see my CDRom and tent drive a start-up network, followed by a brief wait for the message 'Operating system not found' timeout.

    Can someone please help me find a way to create a new guest OS on my VM so that I can.

    1. understand the process

    2 start testing.

    Thank you in advance.

    If you have installed of course the VI Client to create the VM, and you insert the CD into the ESXi host? You can go to change settings on the virtual machine, click the CD/DVD and select the option use the host device. Also ensure the connection to turn on is checked.  When you turn on the virtual machine, it should see the CD that you inserted in your ESXi host. Once you get the operating system to load, you can configure to allow remote desktop connections and access the VM as a traditional physical machine, rather than relying on the console of the VI Client view.

  • Problem with the query and date

    I'm trying to show only the specific results in my query based on the following:

    If the 'agreedate' is greater than today's date, less than 60 days, show it. Otherwise I don't want results.

    I always get the results of the last year and I don't know why.

    Here is my code:

    <!-the value date today less than 60 days. This works and shows the correct date->

    < cfset invitelimit = #now () # >
    < cfset invitelimit = #DateFormat (DateAdd (would be ', - 60, invitelimit), 'dd-mm-yyyy') #.

    <! - query items from the db and try to catch only to those with a more agreedate then the invitelimit date - >


    < name cfquery = "qinvite" datasource = "#Application.ds #" >

    SELECT DISTINCT * from team a

    INNER JOIN followed b ON a.id = b.team_id
    INNER JOIN termsagreement c ON a.login = c.login

    WHERE c.agreedate > #invitelimit # AND b.comp_id = 0

    Group By a.teamname

    < / cfquery >

    First of all.  Confirm that the "argeedate" column is a datetime column.  Not another type of data that would be much more difficult to work with.

    Secondly, you should provide an appropriate database datetime value.  The easiest way would be with the tag.

    I.E.

    WHERE

    c.agreedate > AND

    b.comp_id =

  • problems with the search by using the CIS application.

    Hello

    We are able to connect to the server of Stellent of our J2EE application using our java code CIS.
    while performing research sometimes we get the error and sometimes it works fine (no change in the code)
    We use the socket to SCS connection type to connect via adapterconfig.xml
    Server details:

    CS: 10gR 3

    Please let me know the reason why he acts differently and on what basis we receive this error is also not known. :(

    ... On our J2EE server console, we get the following:

    2009-03-13 14:37:08, web-0 420, WARN (com.stellent.cis.server.api.scs.protoco
    l.impl.HDAProtocol) - could not find the end of header marker! ()
    2009-03-13 14:37:08, web-0 420, WARN (com.stellent.cis.server.api.scs.protoco
    l.impl.HDAProtocol) - did not read all the headers entry, attributing the type EXERCISE
    WN_TYPE

    -------------------------------------------------------
    Of the CommandException stack trace:

    com.stellent.cis.client.api.common.CreateAPIObjectException: error reading the answer of the content server: com.stellent.cis.server.filetransfer.SCSContentTransferStream: could not initialize class com.stellent.cis.client.api.scs.search.impl.SCSSearchResponse with the object of type com.stellent.cis.server.filetransfer.SCSContentTransferStream
    at com.stellent.cis.client.command.impl.services.CommandExecutorService.executeCommand(CommandExecutorService.java:62)
    at com.stellent.cis.client.command.impl.CommandFacade.executeCommand(CommandFacade.java:158)
    at com.stellent.cis.client.command.impl.BaseCommandAPI.invokeCommand(BaseCommandAPI.java:84)
    at com.stellent.cis.client.api.scs.search.impl.SCSSearchAPI.search(SCSSearchAPI.java:92)
    at com.pg.emfg.ewps.stellent.service.impl.StellentDMSServiceImpl.searchString(StellentDMSServiceImpl.java:348)
    at jrun__search2ejspb._jspService(jrun__search2ejspb.java:124)
    at jrun.jsp.runtime.HttpJSPServlet.service(HttpJSPServlet.java:43)
    at jrun.jsp.JSPServlet.service(JSPServlet.java:106)
    at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
    at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
    at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:241)
    at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:527)
    at jrun.servlet.http.WebService.invokeRunnable(WebService.java:172)
    to jrunx.scheduler.ThreadPool$ DownstreamMetrics.invokeRunnable (ThreadPool.java:348)
    to jrunx.scheduler.ThreadPool$ ThreadThrottle.invokeRunnable (ThreadPool.java:451)
    to jrunx.scheduler.ThreadPool$ UpstreamMetrics.invokeRunnable (ThreadPool.java:294)
    at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
    Caused by: com.stellent.cis.client.api.common.CreateAPIObjectException: error reading the answer of the content server: com.stellent.cis.server.filetransfer.SCSContentTransferStream: could not initialize class com.stellent.cis.client.api.scs.search.impl.SCSSearchResponse with the object of type com.stellent.cis.server.filetransfer.SCSContentTransferStream
    at com.stellent.cis.client.api.scs.impl.SCSObject.intialize(SCSObject.java:130)
    at com.stellent.cis.client.api.scs.impl.SCSServerBinder.intialize(SCSServerBinder.java:91)
    at com.stellent.cis.client.api.common.impl.CISAPIObjectFactory._initializeObject(CISAPIObjectFactory.java:250)
    at com.stellent.cis.client.api.common.impl.CISAPIObjectFactory.createObject(CISAPIObjectFactory.java:181)
    at com.stellent.cis.server.api.scs.impl.SCSCommand.prepareResponse(SCSCommand.java:300)
    at com.stellent.cis.server.api.scs.impl.SCSCommand.execute(SCSCommand.java:225)
    at com.stellent.cis.client.command.impl.services.CommandExecutorService.executeCommand(CommandExecutorService.java:57)
    ... 16 more

    Thanks in advance

    Prasad.V

    Hi Prasad,

    The above error is thrown when the socket with Content Server connection is terminated before that Content Server is able to send a full response. Most often, this occurs when the connectionTimeout for the CIS adapter is set to a shorter time than necessary for the Content Server service call ends.
    Note: The error message above also can be lifted during network downtime. Before proceeding with the solution below, you must make sure that there is no problem of network between the CIS Forum and the content server environment.

    -To implement the solution, please perform the following steps:
    1. open a browser and go to the page of information system Audit in the Content Server Administration section.

    2. in the Sections Tracing information section, select system, requestaudit, searchcache searchquery for the text box active Sections.

    3. make sure the Full Verbose Tracing above than the active Sections text box is checked.

    4. click the update button.

    5. at the top of the System Audit information page, click the link View Server output.

    6. on the page out of the server, click the clear button. Leave this window open.

    7. through the application of the CIS, submit the longest race of service or who causes the above error.

    8 return to the window of the browser in step 6, and then click the Refresh button.

    9 review the requestaudit tracing messages and find the service call that takes the most time. In most cases, this will be a GET_SEARCH_RESULTS call, other calls for service can also take some time. Below is an example of line tracing requestaudit showing a second service call 45.536.

    02.09 requestaudit 11:07:54.523 LONG_SEARCH_CUSTOM_SERVICE IdcServerThread-30944 [dUser = sysadmin] [QueryText = dDocTitle + % 3csubstring % 3F + % 60test % 60] [StatusMessage = success] 45.536 (dry)

    10 once the longest running service call is identified, add a reasonable buffer (e.g. 10-15 seconds) to take account of the additional load on the server. This amount of time of the call of service and the amount of memory buffer will be the value used for the connectionTimeout value.

    11. in the adapterconfig.xml, the node connectionTimeout for the CIS adapter to the value calculated in step 10. Please note that the value for the connectionTimeout configuration is specified in milliseconds. For example, if calling the function running longer, more buffer memory is about 60 seconds, then the value of connectionTimout can be assigned to 60000.

    12 restart the CIS Forum and the test.

    Hope this helps

    Thank you
    Srinath

  • Sound problems with the Portege M600 using WXP SP3

    I had problems with my laptop and feel so frustrated his ongoing - please help!

    I downloaded the audio driver (abt a million times - and tried to uninstall and reinstall)- and repeatedly get no icon of volume on top of desktop and a message saying "no sound driver are."

    I managed to repair once - when I had WIndows Vista installed - by finding a dark patch - but this time - no solutions.

    Can anyone help - it's so frustrating!

    If I m remembering well, you need to install all the service packs and KB888111, KB835221.

    Please, do it and see the results.

  • BlackBerry Z10 problems with the battery while using the LTE

    Given that I am connected to LTE (4 G) battery is not longer than 8 hours. Is this normal?

    Use of the battery can vary from one user to another, based on dozens of factors, including running applications, intensity of the mobile signal, the overall health of battery, use of data, etc. There is no use of a normal battery without comparing many factors.

    But 8 hours use of the battery can be normal that Q10 with moderate to heavy use in an area with a great LTE signal at least.

  • No driver found for the new USB drives don't. No problem with the devices previously used.

    Hi, I can not install any "new" USB keys or USB external drives. The error is "driver not found".

    The thumb drives and external drives that I've used are working properly. The error is for the devices was not used in this machine.

    I tried to follow a tip on a site and deleted INFCACHE.1 (after creating a restore point), but it has not changed the behavior.

    Windows 7 32 bit.

    Kind regards

    Check if you have limited the available somehow drives... possibly VMWare has reserved
    the drive letters. Best is to check with the VMWare Support and forums.

    Look in Windows disk management and see if something is there.

    Rob Brown - MS MVP - Windows Desktop Experience: Bike - Mark Twain said it right.

  • Problem with the query.

    I created these queries, but is based on the number of files w_Candidates_Pending, w_Candidates_Pending_Revoked this status I have to set one flag either 1, 2 or 3.

    1 = when 1 or more records for a candidate given pending status,.

    2 = when 1 or more records for a candidate given awaiting status revoked.

    3 = in another State.

    Can u please help me add County in the query and count on the basis, I put 1 one flag.

    WITH w_Pending AS

    (SELECT resource_status_id

    OF ems.resource_status

    WHERE resource_status_desc = 'pending '.

    ),

    w_Pending_Revoked AS

    (SELECT resource_status_id

    OF ems.resource_status

    WHERE resource_status_desc = 'revoke pending. "

    ),

    w_Candidates_Pending AS

    (SELECT DISTINCT ec.ems_candidate_id,

    Eres.resource_status_id,

    Eres.candidate_id

    Of ems_candidate ec,.

    employee_resources eres

    WHERE ec.ems_candidate_id = eres.candidate_id (+)

    AND eres.resource_status_id = (SELECT resource_status_id FROM w_Pending)

    AND eres.through_date IS NULL

    ),

    w_Candidates_Pending_Revoked AS

    (SELECT DISTINCT ec.ems_candidate_id,

    Eres.resource_status_id,

    Eres.candidate_id

    Of ems_candidate ec,.

    employee_resources eres

    WHERE ec.ems_candidate_id = eres.candidate_id (+)

    AND eres.resource_status_id = (SELECT resource_status_id FROM w_Pending_Revoked)

    AND eres.through_date IS NULL

    )

    SELECT DISTINCT CND.ems_candidate_id,

    CND. Name,

    EEJ.ems_job_id,

    (SELECT CASE WHEN COUNT (1) = 0 THEN ELSE 'ADD' END 'n')

    OF wCP w_Candidates_Pending

    WHERE wCP.candidate_id = cnd.ems_candidate_id) pending_flag;

    (SELECT CASE WHEN COUNT (1) = 0 'N' THEN ELSE 'REVOKE' END)

    OF w_Candidates_Pending_Revoked wCPR

    WHERE wCPR.candidate_id = cnd.ems_candidate_id) pending_revoked_flag

    OF ems.ems_candidate cnd.

    EMS.employee_resources err,

    EMS.ems_jobs EJE,

    Rsg EMS.resources_group,

    EMS. Groups grp

    WHERE cnd.ems_candidate_id = err.candidate_id

    AND eej.ems_job_id = cnd.ems_job_id (+)

    AND err.resource_group_id = rsg.resource_group_id

    AND rsg.group_id = grp.group_id

    AND err.through_date IS NULL

    AND IN grp.group_id

    (SELECT DISTINCT grpe.group_id

    Groups_employee grpe, employee emp

    WHERE grpe.person_id = emp.person_id

    AND grpe.person_id = i_logged_in_person_id);

    Maybe

    Select ems_candidate_id,

    name,

    ems_job_id,

    cases where count_pending > 0 and count_pending_revoke is null

    then 1

    When count_pending_revoke > 0 and count_pending is null

    then 2

    When count_pending > 0 and count_pending_revoke > 0

    then 3

    end indicator

    (Select cnd.ems_candidate_id,

    CND. Name,

    EEJ.ems_job_id,

    RSS.resource_status_id,

    RSS.resource_status_desc,

    ROW_NUMBER() over (partition of cnd.ems_candidate_id

    order of rss.resource_status_desc

    ) rn,.

    sum (case rss.resource_status_desc when 'waiting' then 1 end) on

    (cnd.ems_candidate_id order of value null partition

    lines between unbounded preceding and following unlimited

    ) count_pending,.

    sum (case rss.resource_status_desc when 'pending Revoke' then 1 end) on

    (cnd.ems_candidate_id order of value null partition

    lines between unbounded preceding and following unlimited

    ) count_pending_revoke,.

    Count (*) over (partition by order cnd.ems_candidate_id by null

    lines between unbounded preceding and following unlimited

    ) count_candidate_rows

    of ems.ems_candidate cnd.

    EMS.employee_resources err,

    EMS.ems_jobs EJE,

    Rsg EMS.resources_group,

    GRP EMS. Groups,

    EMS.resource_status rss

    where cnd.ems_candidate_id = err.candidate_id

    and eej.ems_job_id = cnd.ems_job_id (+)

    and err.resource_group_id = rsg.resource_group_id

    and rsg.group_id = grp.group_id

    and err.through_date is null

    and grp.group_id in (select distinct)

    GRPE.group_id

    of groups_employee grpe.

    employee emp

    where grpe.person_id = emp.person_id

    and grpe.person_id = i_logged_in_person_id

    )

    and err.resource_status_id = rss.resource_status_id

    )

    where rn = 1

    Concerning

    Etbin

Maybe you are looking for

  • Apple Watch 3.0 update successful, but look at App sows still don't looks no configuration of SOS

    My app Apple Watch have not improved completely as old integrated many features like the looks instead of Dock. The watch seems to have completely updated to 3.0 Watch. How is - a updates the application shows?

  • Disable the download of files in version 3.0.8 without using an add-on

    I need to be able to prevent a user to save a file under version 3.0.8 without using an add-on. Any help would be greatly appreciated.

  • Deactivation of the iphone 4

    Hello I recently sold an iPhone 4 on eBay. Before I sent it, I disconnected and erased all settings. then I went here https://supportprofile.apple.com/ and removed the iPhone of my devices. In addition, I removed the SIM card. The phone is not in my

  • Can I add ram on this machine?

    I just bought a Pavilion notebook e049wm with 750 hd, amd processor and 8g ram. Now that I have heard is not enough RAM for the amd CPU and it says on the page of the product 8g is maximum support. But I have also heard other people say that they hav

  • Find my icons

    I havbe just download updates Windows on another computer running Vista in the usual way, and this included what is called Bing. Rebooting I find now I have a new screen with a land fallow and the name BING., but all my icons are missing. I can't do