Search for a record at least one value

Hello

At the bottom of the example I need data that contains at least one event date start of a particular event.

If the date of start of the event is null for all events for a particular id, then do not appear in the list.

with acf as

(

Select 1001 as the id, "Epilepsy" as illness, 23 January 2015 ' as event_start Union double

Select 1001, "Epilepsy", "Union double

Select 1001, "Ascites", 1 December 2011 the Union double

Select 1002, 'Subileus', "Union double

Select 1002, 'increased creatinine', "Union double

Select 1003, "creatinine decreased", 2 October 2012 ' double Union

Select 1003, "level of creatinine", 2 October 2013 ' double Union

Select 1004, "alkaline serum '," Union double

Select 1005, 'Blood sugar', March 4, 2004 "of the double

)

Select * from acf

Output

IDDISEASEEVENT_START
1001Ascites12/01/2011
1001Epilepsy23/01/2015
1001Epilepsy
1003creatinine decreased10/02/2012
1003creatinine level10/02/2013
1005Blood sugar levels03/04/2004

SELECT *.

Join ACF (select group id of the acf by id having max (event_start) is not null) started using (id)

Ascites 1001 01/12/2011

1001 epilepsy 23/01/2015

1001 epilepsy

1003 creatinine decreases 10/02/2012

1003 creatinine level 10/02/2013

1005 blood sugar level 04/03/2004

Good bye

DPT

Tags: Database

Similar Questions

  • How can I search for files with more than one keyword?

    I ve created a few keywords, and some files in my folder are marked by two, three or more keywords.

    Is it possible to search for files by using more than one keyword in the search field?

    Thank you!

    Use the command find (Edit menu) and in the criteria on the side right is a plus sign to add another criterion and set it to your personal wishes.

    Choose from the results and you should be OK

  • My computer (explorer.exe) continues the search for readers/records.

    Hi experts, I need help on my PC.
    After working with my PC for several hours and minutes when I click/Open 'My Computer' it continues the search for my hard drives and folders in libraries, favorite & computer. He just continues to research and does not display my partition/HARD drive. http://i793.Photobucket.com/albums/yy217/aznix2020/Untitled.PNG
    However, its not freezing or hang up and I can always open my drives/folders by using the command run and after a while it will work fine again.
    Is not a serious problem at the moment because it works well after a while but it's a hassle.
    Also im wondering if this is my drive display relationships safely remove HARD in the options in the task bar. Although the option remove appear for less than a month before I encountered this problem.
    My PC is win7 32 bit sp1. Thanks in advance.

    This problem can be caused by a video driver obsolete or damaged, file system on your PC can be damaged or do not correspond with other files and certain applications or services that are running on your computer may be responsible for Windows Explorer to stop working.

    Refer to the following suggestion and check the status of the issue.

    Install the following update and check if that helps

    Windows Explorer may hang in Windows 7 or in Windows Server 2008 R2.

    https://Support2.Microsoft.com/kb/2515325?WA=wsignin1.0

    If the problem persists, see the suggestions mentioned in the following and check the status of the issue

    Error: Windows Explorer has stopped working.

    http://support.Microsoft.com/kb/2694911

    Note: Before you perform an upgrade in-place, you must be prepared for the worst scenarios that led to your existing data on your computer being deleted. These data include data personal, settings, information about the hardware and software drivers. In case of a worst case scenario, you may have to reinstall all the programs. Make sure that you back up personal data to disks or other external storage devices before performing an upgrade on the spot.

    Note: The data files that are infected must be cleaned only by removing the file completely, which means that there is a risk of data loss.

    Important: System Restore will return all system files not as documents, email, music, etc., to a previous state. These files of types are completely affected by the restoration of the system. If it was your intention with this tool to recover a deleted file to non-system, try using a file instead of system restore recovery program.

    Please let us know if you need assistance.

  • Search for a record at a later date

    Hello

    From this forum, I am able to solve little of my question but not always able to reach the conclusion.

    My requirement is to search the later date in the clob data type and then return records. Dates are available in the format YYYY DD Mon.

    In the example below, I just want these IDS when the variable 'text' contain later date that is available in the text date > current date

    Output must be ID 101, 102 because it contain date > current date

    ID 103 will not come as long as the date (November 19, 2014) < date current (November 20, 2014)

    with abc as

    (

    Select 101 as id, ' Prime Minister arrived in Melbourne for the last leg of his tour of four cities in Australia on March 1, 2014 and April 3, 2100 as the double data

    Union

    Select 102, "The 234/12 advance r1eading of Singapore December 1, 2012, for the third quarter on December 1, 2015, showing no response" of the double

    Union

    Select 103, ' there is no malaria symptom Minister after November 19, 2014 meaning vaccine properly work ' from dual

    )

    Select regexp_substr (data,'[(0123456789)] + [()] + ((Jan) |)) () Feb) | (Mar) | (APR) | (May). (Jun) | (Jul) | (August). (MS) | (Oct) | (Nov). (Dec)) [()] + [(0123456789)] +')

    ABC

    Suggestion:

    FUNCTION to CREATE or REPLACE makeDate (in_string in VARCHAR2
    in_format IN VARCHAR2: = "DD month YYYY")
    date of return
    IS
    BEGIN
    To_date (in_string, in_format) return;
    exception
    When others then return null;
    end;

    /

    WITH abc AS (SELECT 101 AS ID, 'Prime Minister arrived in Melbourne for the last leg of his tour of four cities in the Australia on March 1, 2014-3 April 2100' AS DATA FROM dual
    UNION
    SELECT 102, "The 234/12 advance r1eading of Singapore December 1, 2012, for the third quarter on December 1, 2015, showing no response" OF THE double
    UNION
    SELECT 103, ' there is no malaria symptom Minister after November 19, 2014 meaning vaccine properly work ' FROM DUAL
    UNION
    SELECT 104, ' there is no malaria symptom Minister after 19 Qur'an 2014 sense vaccine working properly ' FROM DUAL
    )
    , date (select id, regexp_substr (data, "([0-9] {1,2} [A-Z] {3} [0-9] {4})', 1, level, 'i'") datestring)
    ABC
    CONNECT PRIOR ID = ID
    AND PRIOR sys_guid() IS NOT NULL
    AND LEVEL<= regexp_count(data,'([0-9]{1,2}="" [a-z]{3}="">
    SELECT a.ID, a.data
    DATE d
    INNER JOIN abc A ON (A.ID = d.ID)
    where makeDate (d.datestring) > sysdate

    /

    Instead of having a WHEN and others-the function you * should * catch possible exceptions.

    I chose to build a to_date function to be able to continue in the case of a bad date.

    HTH

  • Search for global address limited to one account

    Just today my Pre Setup with a 2nd account exschange. I noticed that when you do a GAS for a contact, it will only search account that happened to set up first. Is it a problem known as planned, something did not happen again, etc. ?

    This has been addressed in the update to webOS 1.3.1. Please reply to this thread if you still experience this issue.

  • search for duplicate records

    Hello
    I need your help.
    I have table with name, count, a flag with dublicate records

    example of
    with the name of Adelaide, counties are 3, 4
    with the name of Rigault, charges are 5.5
    with the name of reddy, charges are 1,2,3

    I want to update the indicator
    If count is same then update a folder (flag = 'A') and the other should be flag = 'R '.
    If count is different then update the max (flag = 'A') County and the other should be reject left (flag = 'R').

    can u help me regarding this issue.
    Use the specifications below

    CREATE TABLE TEST_DUB (NAME VARCHAR2 (99), V_COUNT NUMBER, FLAG VARCHAR2 (1));

    Insert into TEST_DUB (NAME, V_COUNT)
    Values
    ('SEB', 3);
    Insert into TEST_DUB
    (NAME, V_COUNT)
    Values
    ('SEB', 4);
    Insert into TEST_DUB
    (NAME, V_COUNT)
    Values
    ('PRAKASH', 4);
    Insert into TEST_DUB
    (NAME, V_COUNT)
    Values
    ('PRAKASH', 3);
    Insert into TEST_DUB
    (NAME, V_COUNT)
    Values
    ('RIGAULT', 5);
    Insert into TEST_DUB
    (NAME, V_COUNT)
    Values
    ('RIGAULT', 5);
    Insert into TEST_DUB
    (NAME, V_COUNT)
    Values
    ("REDDY", 1);
    Insert into TEST_DUB
    (NAME, V_COUNT)
    Values
    ("REDDY", 2);
    Insert into TEST_DUB
    (NAME, V_COUNT)
    Values
    ("REDDY", 3);
    Insert into TEST_DUB
    (NAME, V_COUNT)
    Values
    ("YELLA", 2);
    Insert into TEST_DUB
    (NAME, V_COUNT)
    Values
    ("YELLA", 2);
    Insert into TEST_DUB
    (NAME, V_COUNT)
    Values
    ("YELLA", 2);
    Insert into TEST_DUB
    (NAME, V_COUNT)
    Values
    ('KAMAL', 3);
    Insert into TEST_DUB
    (NAME, V_COUNT)
    Values
    ("KAMAL", 2);
    Insert into TEST_DUB
    (NAME, V_COUNT)
    Values
    ("KAMAL", 1);
    COMMIT;


    Select * from TEST_DUB

    Thanks and greetings
    Swayamprakash.Chiluveru

    Published by: cocoynacq Swayamprakash on May 19, 2010 22:54

    is it?

     UPDATE test_dub t1
    SET flag =
      (SELECT DECODE(rnum,1,'A','R')
         FROM
        (SELECT rowid,
          v_count    ,
          name       ,
          row_number() over (partition BY name order by v_count DESC) rnum
           FROM test_dub
        ) t2
        WHERE t1.rowid = t2.rowid
      )
    

    Ravi Kumar

  • Search for items that are in one node to a date given (responses/dashboard)

    Hi and thanks for reading,

    I have the following problem:
    An element is in arriving at a node and starting from this node a little later. In my table, I have the finish and the start datetime. Now, I would like to create a guest/filter on the dashboard, so that I give in a datetime and the dashboard shows me all the elements that are there to this date. For the moment I have two guests for arrival is less than the given date and departure is larger than the given date. But I would like to have a single table that filters for all the elements that are there to this date.

    Any suggestions are appreciated

    Evgeny

    You also have another solution.

    You can use a command prompt and set a variable presentation date then in your report filter:

    arrival is smaller than the presentation variable and departure is bigger than the presentation variable
    

    Check here how to set a variable of presentation:
    http://gerardnico.com/wiki/dat/OBIEE/obiee_setting_variable

    Click here for the file server:
    http://gerardnico.com/wiki/dat/OBIEE/presentation_service/obiee_presentation_variable_area#filter

    And here for the format of the default mask:
    http://gerardnico.com/wiki/dat/OBIEE/logical_sql/obiee_date_variable

    See you soon
    Nico

  • Acrobat XI can search for several words at a time?

    Every day I check a long list of words in a new and large file I'm sent. I tried to look up these words doing a single search query, but it seems that it's not possible. In the advanced search section I hace tried to do queries like word1 word2, nothing. Word1 AND word2, nothing. Word1 + word2, nothing. Nothing works. Can search for acrobat even more than one word at a time?

    Thanks for your comments.

    Kind regards.

    Jose.

    Of course, it is possible. In the advanced search window, press show more Options then select 'Match any of the words' under the heading "Return results containing" and enter your search terms separated by a space, like this:

  • Search for the nearest value table

    IM wondering if its possible to find a 1 d table worth, if it is not found, then find the nearest match. IM using the 'double' data type and I need at least an accuracy of 4 decimal point in the research.

    For now, im rounding decimal values to the nearest integers from you, but it is not effective at all. Im getting a lot of unwanted split in the plot. I need to be able to search for the decimal points. I found this function "About Equals.VI" starting from a previous thread. Even that uses the concept of the rounding.

    I enclose 3 screws "0.8 & 0.4.VI" are that I created, rounding decimals nearest digit.

    The "approximately equal" is the one I found online.

    The 3rd is I try to mess with what I can find as close a match.

    Y at - it a trick to work around this problem?

    Thank you

    Eureka

    This VI uses the first type of step 3 in your data.  Since you said that you can get the data, you can drop the in VI.

    At the end where I calculate the slope, you can use a linear adjustment if you have full or professional LabVIEW.

  • How can I change the registry values with a common search for the string and replace the function where I don't do all manually?

    Due to problems of space with my installation of XP Pro, (operating system has been installed on a 4 GB partition and I did have a copy of the OS to do a new installation) I am trying to move a number of files on a mounted drive.

    It is a way to search an entire record of [SPECIFY FOLDER] "C:\Program Files\" instances and replace each with "C:\Program Files\Overflow\ [SPECIFY FOLDER]" as a common discovery replace function?

    Also, I'll have to move several "Common Files" files in the mounted folder 'Overflow '. The method to make learning one should help me to do both. Manually, it will take most of thousand years that all the files in HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Components
    the files seem to have a key value have changed.

    I have already uninstalled and reinstalled some programs at the desired location, but many still use the "Common files" folder despite my having already changed the default installation directory path in the registry. Any help would be appreciated.

    Thank you

    NORTH CAROLINA

    One way:

    1. Start Regedit (start-> Run-> 'Regedit')
    2. Select the branch of the registry, or you are interested in changing.
    3. The export of this branch of the registry (file-> export) in a ".reg" file
    4. Use a programming editor (for example, the freeware Notepad ++) and use the "Find and replace" function to make the changes you want.  Save the modified file.
    5. After making the changes, double-click the .reg file to fold changes in your registry.

    As always, keep a backup of your original registry in case things get really bad and know how to do to restore this backup your machine should not be able to start.

    Notepad ++: <> http://notepad-plus-plus.org/ >

    HTH,
    JW

  • How to guarantee a box has at least one active record

    Hello

    I have a table block (two-elements of text with a box,

    I want to prevent the user from leaving the form unless there is at least one active record?

    in the item properties box

    When checked the value property value = 1

    value when the value of uncontrolled property = 0-> this unchecked value must be 0. If you can find out if the box is checked or unchecked at least

    then add article no db to the block. Use the text-to-speech function SUM this out of the box.

    If at least one checkbox is selected, this summary will be > 0

    If all elements of the block check box is not checked, this article summary = 0

    maybe help you.

  • Determine a value for each record for the whole group

    < < Sorry I pasted erroneous results earlier > >

    Hello

    I have a table (in production, join the many tables, but for simplicity, I created a table), which has a few related accounts grouped by ACCT_GRP_ID I have to write a SQL (not a PL/SQL), who should have all columns of this table and an extra column "FLAG". For GA_CD = BBC, FLAG must have a value of 'No Show', if the APP_DT of at least a recording with the group is less than the current year also all the records in the group will have a value of 'Show '. For the record no BBC FLAG must always be 'Show '.

    DDLS
    {code}
    CREATE TABLE ACCOUNTS
    (NUMBER OF ACCT_GRP_ID,
    GA_CD VARCHAR2 (10),
    AGNT_NAME VARCHAR2 (50).
    NUMBER OF CASE_NUM
    NUMBER OF FUND_AMT
    DATE OF APP_DT,
    STATUS VARCHAR2 (10));

    INSERT INTO ACCOUNT VALUES (1, 'BBC', 'SAMANTHA, JOSE, 12345, 234.33, 2 AUG 2008', ' PLACED');
    INSERT INTO ACCOUNT VALUES (1, 'BBC', 'SAMANTHA, JOSE, 12346, 331,13, 24 APR 2009', ' PLACED');
    INSERT INTO ACCOUNT VALUES (1, 'BBC', 'SAMANTHA, JOSE, 12347, 201,27, 13 FEB 2009', ' PLACED');
    INSERT INTO ACCOUNT VALUES (2, 'BBC', ' MARK, ROSS, 12348, 98.12, 31 MAY 2009', 'PLACE' ");
    INSERT INTO ACCOUNT VALUES (2, 'BBC', ' MARK, ROSS, 12349, 121.00, 25 JUNE 2009', 'PLACE' ");
    INSERT INTO ACCOUNT VALUES (2, 'BBC', 'BRAND, ROSS, 12350, 11.00, 27 JUNE 2009', 'CLOSED');
    INSERT INTO ACCOUNT VALUES (3, 'BBC', "RAJ MALIK", 12351, 89.00, 31 DEC 2008', 'PLACED');
    INSERT INTO ACCOUNT VALUES (3, 'BBC', "RAJ MALIK", 12352, 22.00, 26 OCT 2008', 'PLACED');
    INSERT INTO ACCOUNT VALUES (4, 'BBC', 'SHANE, WILLS', 12353, 443.00, 7 JUNE 2009', 'PLACE');
    INSERT INTO ACCOUNT VALUES (5, 'BBC', 'JANE, WALLACE, 12354, 74.00, 17 JAN 2009', ' PLACED');
    INSERT INTO ACCOUNT VALUES (NULL, 'BBC', 'ROSY, BETH', 12355, 124.00, 21 MAR 2009', 'PLACE');
    INSERT INTO ACCOUNT VALUES (NULL, 'STAR', 'TINA, WZWICK', 22330, 89.00, 31 DEC 2008', 'PLACED');
    INSERT INTO ACCOUNT VALUES (NULL, 'STAR', 'YANA, KORVIN', 27351, 22.00, 26 OCT 2008', 'PLACED');
    INSERT INTO ACCOUNT VALUES (NULL, 'STAR', 'SARA, YUI', 22352, 443.00, 7 JUNE 2009', 'PLACE');
    INSERT INTO ACCOUNT VALUES (NULL, 'STAR', 'MIKE, TROY, 22453, 74.00, 17 JAN 2009', ' PLACED');

    COMMIT;
    {code}

    Required result:
    {code}
    APP_DT GA_CD AGNT_NAME STATE BOITE_ FUND_ ACCT_ INDICATOR
    AMT NUM GRP_ID
    1 SAMANTHA, JOSE PLACE 12347 201.27 BBC 13/02/2009 no show
    1 SAMANTHA, JOSE PLACE 12346 331.13 BBC 24/04/2009 no show
    1 SAMANTHA, JOSE PLACE 12345 234.33 BBC 08/02/2008 no show
    MD2 BBC BRAND, ROSS CLOSED 12350 11 6/27/2009 see the
    MD2 BBC BRAND, ROSS PLACED 12349 121 6/25/2009 see the
    2 BRAND of BBC, ROSS PLACE 12348 98.12 show of 31/05/2009
    3 BBC RAJ MALIK not PLACED 12352 22 10/26/2008 no show
    3 BBC RAJ MALIK not PLACED 12351 89 12/31/2008 no show
    4 BBC SHANE, WILLS PLACE 12353 443 6/7/2009 see the
    5 BBC JANE, WALLACE PLACE 12354 74 1/17/2009 see the
    STARS of MIKE, TROY PLACED 22453 74 1/17/2009 see the
    See the BBC ROSE, BETH PLACED 12355 124 3/21/2009
    STAR SARA, YUI PLACED 22352 443 6/7/2009 see the
    TINA, WZWICK STAR PLACED 22330 89 12/31/2008 see the
    YANA STAR, KORVIN PLACED 27351 22 10/26/2008 see the
    {code}

    As in the results Group 1 has a record with the date of 2008 for the whole group getting 'No Show'. Group 2 has all the records this year, so he gets the 'Show '.
    Help, please!

    Published by: Kuul13 on June 25, 2009 13:31

    Published by: Kuul13 on June 25, 2009 13:43
    I think I'm really having a BAD BAD day... Sorry again... I don't need the domain TOT_FUND_AMT...

    Hello

    Thanks for posting the DDL and DML statements. This helps a lot.

    I don't understand the output, however. Do you want to really two rows of output for each row in the table? The tot_fund_amt is copied from somewhere else? More important still, the results do not include the new flag column. Isn't the point of all of this question? It's good to describe how the indicator is calculated, but you have to show, too.

    I think you want analytical MIN function to find the first app_dt in each group, like this:

    SELECT  a.*
    ,     CASE
              WHEN  ga_cd = 'BBC'
              AND   MIN (app_dt) OVER ( PARTITION BY  ga_cd
                                          ,              acct_grp_id
                                        )  < TRUNC (SYSDATE, 'YYYY')
                    THEN  'No Show'
                    ELSE  'Show'
         END     AS flag
    FROM     accounts   a
    ;
    

    Output:

    . ACCT
      _GRP GA                     CASE     FUND
       _ID _CD  AGNT_NAME         _NUM     _AMT APP_DT     STATUS FLAG
    ------ ---- --------------- ------ -------- ---------- ------ -------
         1 BBC  SAMANTHA, JOSE   12345   234.33 08/02/2008 PLACED No Show
         1 BBC  SAMANTHA, JOSE   12346   331.13 04/24/2009 PLACED No Show
         1 BBC  SAMANTHA, JOSE   12347   201.27 02/13/2009 PLACED No Show
         2 BBC  MARK, ROSS       12348    98.12 05/31/2009 PLACED Show
         2 BBC  MARK, ROSS       12349   121.00 06/25/2009 PLACED Show
         2 BBC  MARK, ROSS       12350    11.00 06/27/2009 CLOSED Show
         3 BBC  RAJ, MALIK       12351    89.00 12/31/2008 PLACED No Show
         3 BBC  RAJ, MALIK       12352    22.00 10/26/2008 PLACED No Show
         4 BBC  SHANE, WILLS     12353   443.00 06/07/2009 PLACED Show
         5 BBC  JANE, WALLACE    12354    74.00 01/17/2009 PLACED Show
           BBC  ROSY, BETH       12355   124.00 03/21/2009 PLACED Show
           STAR TINA, WZWICK     22330    89.00 12/31/2008 PLACED Show
           STAR SARA, YUI        22352   443.00 06/07/2009 PLACED Show
           STAR MIKE, TROY       22453    74.00 01/17/2009 PLACED Show
           STAR YANA, KORVIN     27351    22.00 10/26/2008 PLACED Show
    

    Note that the NULL acct_grp_id is a group. PARTITION BY acct_grp_id is of course necessary, but we must also, PARTITION BY ga_cd all non-BBC lines will be included in this group. In other words, we are unwilling reported as 'No Show', all ROSY just because TINA or JANA had an early app_dt.

  • Search for century link address bar but only for one word

    I fixed that in time on the century and disabled all link page and also the fixed there are in the config, but with the latest update of Firefox when I just search for a word it evokes century links, all of the other research that are more than one word I get the usual Google.

    If this happens again...

    Maybe it's a helpdesk Web of Qwest (sic) .
    http://www.dslreports.com/Forum/r26435215-Qwest-opting-out-of-CenturyLink-Web-Helper-hijacking-not-worki

    There is an 'opt-out' on this page - http://webhelper.centurylink.com/prefs.php
    Note: When you disable who have only pref is saved in a cookie. So, if you clear your cookies, you will need to return to this page and set this preference all over again; so bookmark this page, if Qwest is your ISP and you use DNS servers (which is the default, unless you have changed in the operating system).

  • 'Search' homepage won't work, searching for words, should go to the address bar to get one will search for.

    When I go to the start page, after clicking on the icon for Mozilla Firefox, if I type in the box and press 'Search', it does nothing. I have to go to the top of the address bar to search for anything. This isn't like Google, where I can type a few words, for example, CBS (the station news and hit search and get results). Any ideas?

    Hello mdchlanda, first of all, please see install research reset addon can solve the problem: https://addons.mozilla.org/firefox/addon/searchreset/ (a restart of the browser is needed later).

    If not, try the following steps to manually restore the search function on the default home page:

    1. Go to firefox > help > troubleshooting information and click file/show profile folder. a windows Explorer window should open - to delete the file named chromeappsstore.sqlite.
    2. then enter Subject: config in the bar firefox address (confirm the message information where it appears) & get preference named browser.startup.homepage_override.mstone - right click and restore the default value for that entry.
    3. Restart firefox
  • How can I create a plugin to search for more than one field

    There are a number of sites that have search capabilities, but they require entries in several fields.
    For example, one such site is the directory of IBM employees.
    (http://www.ibm.com/contact/employees/servlets/lookup)
    On this site - in order to achieve usable results - I have to enter the first name and last name of the employee, that I'm looking.
    I created a plugin to search for the site, but I could not divide the text into two parts and give them separate way for the form fields.

    Is there a way to do this?

    Kind regards

    Imre

    Perhaps via a bookmarklet to keyword.

    See http://kb.mozillazine.org/Multiple_parameter_keyword_searches

Maybe you are looking for