Help to get max date of the group

Hi, How I can get the max(date1) for the group on the basis of Code1,Code2,Code3.
Code1    Code2   Code3     Date1         RTCODE
A           A1        A2         1/1/2012     SER
A           A1        A2         1/1/2013     SER
A           A1        A2         1/1/2015     TER
B          B1        B2         1/1/2011       JTS
B          B1        B2         1/1/2012      JTR
C          C1       C2         1/1/2010      HYR
C          C1       C2         1/1/2011       JST
Expected results from query should be:
Code1    Code2   Code3     Date1         RTCODE
A           A1        A2         1/1/2015      TER
B           B1        B2         1/1/2012      JTR
C          C1       C2          1/1/2011       JST

Hi,
You can try this:
CREATE TABLE #T
CODE1 VARCHAR(5),
CODE2 VARCHAR(5),
CODE3 VARCHAR(5),
DATE1 DATE,
RTCODE VARCHAR(5)
--DROP TABLE #T
INSERT INTO #T
VALUES
('A','A1','A2','20120101','SER'),
('A','A1','A2','20130101','SER'),
('A','A1','A2','20150101','TER'),
('B','B1','B2','20110101','JTS'),
('B','B1','B2','20120101','JTR'),
('C','C1','C2','20100101','HYR'),
('C','C1','C2','20110101','JST');
--TRUNCATE TABLE #T
WITH TEST AS
SELECT CODE1, CODE2, CODE3, MAX(DATE1) AS DT_MAX
FROM #T
GROUP BY CODE1, CODE2, CODE3
SELECT T.CODE1,T.CODE2, T.CODE3, T.DT_MAX,#T.RTCODE
FROM TEST AS T
INNER JOIN #T ON T.CODE1=#T.CODE1
AND T.CODE2=#T.CODE2
AND T.CODE3=#T.CODE3
AND T.DT_MAX=#T.DATE1
ORDER BY T.CODE1,T.CODE2,T.CODE3
Regards,
Reshma
Please Vote as Helpful if an answer is helpful and/or Please mark Proposed as Answer or Mark As Answer when question is answered

Similar Messages

  • In mdx how to get max date for all employees is it posible shall we use group by in mdx

    in mdx how to get max date for all employees is it posible shall we use group by in mdx
    example
    empno  ename date
    1         hari        12-01-1982
    1         hari        13-06-2000
    by using above data i want to get max data

    Hi Hari3109,
    According to your description, you want to get the max date for the employees, right?
    In your scenario, do you want to get the max date for all the employees or for each employee? In MDX, we have the Max function to achieve your requirement. You can refer to Naveen's link or the link below to see the details.
    http://www.sqldbpros.com/2013/08/get-the-max-date-from-a-cube-using-mdx/
    If this is not what you want, please provide us more information about the structure of you cube, so that we can make further analysis.
    Regards,
    Charlie Liao
    TechNet Community Support

  • Help me get my data back on my phone wont you please please help me help me

    (Above like the beatles song)Two days after getting a replacement 3G phone I can't get Itunes to recognise the phone so I can back it up to get my data on the Iphone. Any recommendations. Many hours on the phone to no avail so far. Below is a diagnostic.
    Microsoft Windows Vista Home Premium Edition Service Pack 2 (Build 6002)
    HP-Pavilion GQ562AA-ABG m9070a
    iTunes 9.0.3.15
    QuickTime 7.6.5
    FairPlay 1.6.16
    Apple Application Support 1.1.0
    iPod Updater Library 9.0d11
    CD Driver 2.2.0.1
    CD Driver DLL 2.1.1.1
    Apple Mobile Device 2.6.0.32
    Apple Mobile Device Driver 1.45.0.0
    Bonjour 1.0.6.2 (118.5)
    iTunes Serial Number 6F3F138CE4B6D364
    Current user is an administrator.
    The current local date and time is 2010-02-24 20:34:21.
    iTunes is not running in safe mode.
    Video Display Information
    NVIDIA, NVIDIA GeForce 8400 GS
    ** External Plug-ins Information **
    No external plug-ins installed.
    ** iPod/iPhone Connectivity Tests **
    iPodService 9.0.3.15 is currently running.
    iTunesHelper 9.0.3.15 is currently running.
    Apple Mobile Device service 2.50.39.0 is currently running.
    Universal Serial Bus Controllers:
    Intel(R) ICH9 Family USB Universal Host Controller - 2934. Device is working properly.
    Intel(R) ICH9 Family USB Universal Host Controller - 2935. Device is working properly.
    Intel(R) ICH9 Family USB Universal Host Controller - 2936. Device is working properly.
    Intel(R) ICH9 Family USB Universal Host Controller - 2937. Device is working properly.
    Intel(R) ICH9 Family USB Universal Host Controller - 2938. Device is working properly.
    Intel(R) ICH9 Family USB Universal Host Controller - 2939. Device is working properly.
    Intel(R) ICH9 Family USB2 Enhanced Host Controller - 293A. Device is working properly.
    Intel(R) ICH9 Family USB2 Enhanced Host Controller - 293C. Device is working properly.
    FireWire (IEEE 1394) Host Controllers:
    AGERE OHCI Compliant IEEE 1394 Host Controller. Device is working properly.
    Most Recent Device Not Currently Connected:
    iPod shuffle (2nd & 3rd Generation) running firmware version 1.0.4
    Serial Number: 6V84634H436
    iPhone 3G running firmware version 3.1.3
    Serial Number: 889172BNY7K
    PS thats not the Serial No in the phone.

    Welcome to the discussions,
    Did you already try to connect in recovery mode? http://support.apple.com/kb/HT1808
    See "iPhone not recognized in Windows" for more possible solutions: http://support.apple.com/kb/TS1495

  • How do I get routing data from the Map App (powered by TomTom) so I can display the point-to-point annotations (turn-by-turn navigation) without leaving my own application.

    I have a tableView displaying a list of contacts from a Cloud Database.  After selecting a contact, I push to a programmatically created MKMapView.  Then I display the initial region (the view) that includes the users current location (starting point) and their selected destination (end point).
    Now I want to display annotations (as described in the Location Awareness Programming Guide) that displays polylines which will represent the turn-by-turn navigation IN MY OWN APPLICATION, and not in the Map App currently used in IOS6. 
    Due to licensing and its becoming depricated in IOS 6, I do not want to get routing data from the Google Maps API.  How do I get routing data from the IOS 6 Map App (powered by TomTom) so I can display the point-to-point annotations (turn-by-turn navigation) without leaving my own application?
    I checked out Stack Overflow and other forums which basically left me with the impression that this is not possible. I also checked out the TomTom iPhone Mobile SDK User Guide from the TomTom Developer Portal and am still confused.  It must be possible to retrieve routes, since the Map App can display turn-by-turn directions.  How can I retrieve turn-by-turn data that I may display as a route within my own application?

    Thanks Michael. Apologies for the slow reply I was away for a bit (holiday blitz at work and visiting family madness etc.etc.) back now, I set both options you requested to "never " and retried the CMS software with no change. 
    I do have progress of a sort though, as a test I took a separate test PC and put a clean install of Win7 on and loaded up the CMS software (it worked perfectly) and then took the version of ole32.dll off that machine and put it onto the computer I had built
    for her (using Linux) and...
    got a new error code. Darn I was so sure I had found a clever solution this time lol.
    Anyway now when the CMS fails it gives me a similar error but the offending module is "ntdll.dll" sooo... I tried taking the "working" version of ntdll.dll from the test box and moving it over (making sure to back up the existing ones
    first so I could put them back if needed) to her new PC and the PC would not boot. 
    It seems to want the original versions of a few Dynamic Link Libraries and if I could somehow give it those while not breaking Win7 it should theoretically work seeing as it no longer errors with ole32.dll. 
    ntdll.dll however seems necessary for Win7 to boot.
    So what I am wondering now is:
    Is there some way to have both versions of the DLL file in the system32 folder (bypassing the "cannot have two files with the exact same name in the same folder" thing) or rename the original DLL's something else and somehow make the CMS look for
    the new named versions so the system has the updated DLL's it needs to boot/run and the CMS has the old ones it wants to run or is there someway to have a self contained install of the CMS, say on a USB flash drive and give it it's own E:/windows/system32/needed
    dll's  path to the files it needs? 
    Willing to try any other options or settings you may have come up with as well.
    Thanks again for your reply and my apologies for not answering sooner.

  • How to get last date of the week

    hi,
    how to get last date of the week like FM WEEK_GET_FIRST_DAY gives the date of the first day of the week i need the date of the last day of the week..
    thnx

    data : p_week type KWEEK,
    p_Date type SYDATUM.
    p_week = <incoming value in week of year>
    CALL FUNCTION 'WEEK_GET_FIRST_DAY'
    EXPORTING
    week = p_week
    IMPORTING
    DATE = p_date
    EXCEPTIONS
    WEEK_INVALID = 1
    OTHERS = 2
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    To get the last day of the week.
    p_date = p_date + 6.
    You can find the available fm in the system from se37 transaction code.

  • SQL Help getting Max() date....

    Hi gurus, Here is my situation:
    Here is the sample data:
    Policy_Id Policy-Exp_Dt COl_1
    123_____10/30/2008 __ 333
    123_____ 09/25/2008___445
    123_____ 08/30/2008___443
    Here i have to get the Policy-Exp_Dt from the second row; In other words for all rows which have a similar Policy_Id i should first find out the max(Policy-Exp_Dt) and get the next smallest available date to that.
    I have tried using
    select Policy_Id, COl_1, Policy_Exp_Dt from
    table_1
    where Policy-Exp_Dt = (select max(Policy-Exp_Dt)-1 from
    table_1 a
    where a.policy_id = table_1.policy_id)
    but here i am getting the value = 10/30/2008 - 1 which is 10/29/2008 but i need the value 9/25/2008 which is the next available date less than the max() date.
    Please Advise.
    Edited by: user521009 on Jan 9, 2009 1:56 PM

    I thought to use lag - maybe not as appropriate a ranking functions.
    Also we have a case where there is only One record for a policy - exclude this I guess!
    drop table Max_but_One;
    create table Max_but_One
      Policy_Id      integer      not null,
      Policy_Expires date         not null,
      Policy_Note    varchar2(20) not null
    -- Standard data
    insert into Max_but_One values (123, to_date('30-08-2008','dd-mm-yyyy'), 'First note');
    insert into Max_but_One values (123, to_date('25-09-2008','dd-mm-yyyy'), 'Second note');
    insert into Max_but_One values (123, to_date('30-10-2008','dd-mm-yyyy'), 'Third note');
    -- Standard data again for double check
    insert into Max_but_One values (223, to_date('01-11-2008','dd-mm-yyyy'), 'First note');
    insert into Max_but_One values (223, to_date('02-11-2008','dd-mm-yyyy'), 'Second note');
    -- Only one record for a policy!
    insert into Max_but_One values (323, to_date('01-12-2008','dd-mm-yyyy'), 'First note');
    -- Two or more records for a policy both having the same date which is prior to the max
    insert into Max_but_One values (423, to_date('10-12-2008','dd-mm-yyyy'), 'First note');
    insert into Max_but_One values (423, to_date('10-12-2008','dd-mm-yyyy'), 'Second note');
    insert into Max_but_One values (423, to_date('11-12-2008','dd-mm-yyyy'), 'Third note');
    break on Policy_ID
    select Policy_Id, Policy_Expires, Policy_Note
      from Max_but_One
    order by Policy_Id, Policy_Expires
    POLICY_ID POLICY_EX POLICY_NOTE
           123 30-AUG-08 First note
               25-SEP-08 Second note
               30-OCT-08 Third note
           223 01-NOV-08 First note
               02-NOV-08 Second note
           323 01-DEC-08 First note
           423 10-DEC-08 First note
               10-DEC-08 Second note
               11-DEC-08 Third note
    -- Max Policy_Expires
    select t.*
      from (select Policy_Id, Policy_Expires, Policy_Note
                  ,max(Policy_Expires) over (partition by Policy_Id) as Max_Policy_Expires
              from Max_but_One
           ) t
    where t.Policy_Expires = t.Max_Policy_Expires
    POLICY_ID POLICY_EX POLICY_NOTE          MAX_POLIC
           123 30-OCT-08 Third note           30-OCT-08
           223 02-NOV-08 Second note          02-NOV-08
           323 01-DEC-08 First note           01-DEC-08
           423 11-DEC-08 Third note           11-DEC-08
    -- Using LAG
    select t.Policy_Id
          ,t.Prior_Policy_Expires as Policy_Expires
          ,t.Prior_Policy_Note    as Policy_Note
      from (select Policy_Id, Policy_Expires, Policy_Note
                  ,max(Policy_Expires) over (partition by Policy_Id) as Max_Policy_Expires
                ,lag(Policy_Expires) over (partition by Policy_Id order by Policy_Expires) as Prior_Policy_Expires
                  ,lag(Policy_Note)    over (partition by Policy_Id order by Policy_Expires) as Prior_Policy_Note
              from Max_but_One
           ) t
    where t.Policy_Expires = t.Max_Policy_Expires
    POLICY_ID POLICY_EX POLICY_NOTE
           123 25-SEP-08 Second note
           223 01-NOV-08 First note
           323
           423 10-DEC-08 Second note
    -- To exclude the single record policy then add and t.Prior_Policy_Expires is not null
    select t.Policy_Id
          ,t.Prior_Policy_Expires as Policy_Expires
          ,t.Prior_Policy_Note    as Policy_Note
      from (select Policy_Id, Policy_Expires, Policy_Note
                  ,max(Policy_Expires) over (partition by Policy_Id) as Max_Policy_Expires
                ,lag(Policy_Expires) over (partition by Policy_Id order by Policy_Expires) as Prior_Policy_Expires
                  ,lag(Policy_Note)    over (partition by Policy_Id order by Policy_Expires) as Prior_Policy_Note
              from Max_but_One
           ) t
    where t.Policy_Expires = t.Max_Policy_Expires
       and t.Prior_Policy_Expires is not null
    POLICY_ID POLICY_EX POLICY_NOTE
           123 25-SEP-08 Second note
           223 01-NOV-08 First note
           423 10-DEC-08 Second note
    -- 423 is randomly picked here - could equally have got {423, 10-DEC-08, First note}

  • Trying to get max date grouped by type

    hello,
    i have a request table with:
    request name
    request start date
    The requests run daily so i have multiple records. In answers i want to display request name and the max(request start date), grouped by request name. Is it possible to due this in answers only? if i must use the repository how do i do it? I'm new to building subject areas.

    You can do this in answers only, If you dont have access to RPD.
    Sol1: Create a report with two columns request name,request start date. Open pivot table and add request start date to measures and apply Aggregation of Max on date.
    sol2: Create a report with two columns request name,request start date, Change the Fx of request start date to max(request start date by request name) . This way table view also show request max date by request names.

  • How to get max date field in the query

    Hi,
    We uploads the data into the cube every week.
    Basically we are planning to put some ticker on the query. This ticker will show the user, upto which date the data is available in the cube.
    I want the query, which will show me only the maximum date (maximum 0calday) from the infocube in the report.
    This in turn, I will use in the ticker and make use of it.
    Can anyone please help in making this query.
    Thanks
    Ramesh Ganji

    if 0CALDAY is used as a characteristic then you have to convert that as a key figure using a replacement path variable.
    Please see the below link for changing 0CALDAY as a key figure using Replacement path
    http://www.sd-solutions.com/documents/SDS_BW_Replacement%20Path%20Variables.html
    https://websmp106.sap-ag.de/~sapdownload/011000358700001963972003E/HowToCalcWithAttr.pdf
    Now you have to create an exception "Top N Rows" based on the replacement path variable created above.
    This will solve your problem.
    Regs
    Gopi.
    Award points if it helps ...

  • Getting max date and max time column plz help

    hi
    i have a table with suppose 7 columns with date and time column seperate
    i want to design a query which retrieve the current or the maxmum date with the max of time in that date.
    columns a ,b,c, date, time
    22-05-07 20
    23-05-07 50
    24-05-07 40
    25-05-07 30
    22-05-07 20
    ans " suppose current date is 25 "
    a,b,c,25-05-07,40

    try like this..
    SQL> with rt as
      2  (select 1 col1,'22-05-07' dt, 20 tm from dual union all
      3  select 2,'23-05-07', 50 from dual union all
      4  select 3,'24-05-07', 40 from dual union all
      5  select 4,'25-05-07', 30 from dual union all
      6  select 5,'25-05-07', 45 from dual union all
      7  select 6,'22-05-07', 20 from dual)
      8  select col1,dt,tm from
      9  (select col1,
    10      dt,
    11      max(tm) over(partition by to_date(dt,'DD-MM-RR') order by col1 desc) tm,
    12      row_number() over(partition by to_date(dt,'DD-MM-RR') order by col1 desc) rn
    13  from rt where to_date(dt,'DD-MM-RR') in (select max(to_date(dt,'DD-MM-RR')) dt from rt))
    14  where rn = 1;
          COL1 DT               TM
             5 25-05-07         45
    SQL>

  • SSAS Tabular DAX- Need to get MAX value of the MIN (top)hierarchy level row

    EDIT:
    I got closer to resolving the issue using MAX. 
    However, If I remove the department hierarchy and just place on the MAX measure I get the single largest value out of all departments. 
    It would be ideal if the measure could still SUM the "top level" values across everything in the system if the hierarchy is not placed on the rows grouping.
    So it returns the largest value for a given department, but if the department hierarchy isn't present I need it to return a SUM of all the level 1 values for all departments...
    Basically return MAX value from the MIN L1ID's DeptLevel value, but I can't seem to construct that DAX query.  So if DepartmentID hierarchy is on display it gets MAX per row, but if that is removed it dips into MAX GoalValue for each L1ID grouping with
    the MIN DeptLevel.
    /EDIT
    I have a rather odd data table I'm bringing into a SSAS Tabular model.
    Instead of having all data at each child level and then it adding up to a grand total in the parent, it has a grand total predefined at each child level.
    I just need this tool to display the raw data if at all possible instead of trying to aggregate everything. Filter on active level, ignore child levels.
    Is there a way to do that?
    Example:
    SalesGoalsByDepartmentLevel:
    Level1 (top level) = 5,000
    Level2( lower level) = 0
    Level3(lower still) = 500
    Level 4(lowest) = 4,250
    So note that adding up all the child levels is still $250 shy of the top 5,000.
    IT is just an odd business rule, basically each level is expected to meet that goal or exceed it, the top level goal is 5,000 but management doesn't care where that last 250 comes from, they do are that each defined level is met.
    These levels are in a hierarchy so if I view the top level of the hierarchy it adds up to 4250+500+5000=9750 when I just want to see 5,000 at the top level and the details when they drill down.
    I added a filter to just filter to the top level, but then when I drill down of course those lower levels are blank.
    Is there a way to filter on the current displayed level without aggregating all child levels?
    Thanks!

    You might want to take a look at the Parent-Child Hierarchies pattern here:
    http://www.daxpatterns.com/parent-child-hierarchies/
    You might write DAX code to check what is the "current" level (see BrowseDepth measure in the sample file you can download) and depending on its level, se the filter to blank to all the levels below, so you don't aggregate "children".
    Just an idea, I'm not sure if it corresponds to your requirement and I don't have time to make more tests.
    I hope it will be helpful.
    Marco Russo (Blog,
    Twitter,
    LinkedIn) - sqlbi.com:
    Articles, Videos,
    Tools, Consultancy,
    Training
    Format with DAX Formatter and design with
    DAX Patterns. Learn
    Power Pivot and SSAS Tabular.

  • Getting error Data record has grouping value "" in

    Trying to change Address data in HR using BAPI_ADDRESSEMPUS_CHANGE
    Getting error message : Data record has grouping value "" instead of ""
    Please advise.
    Thanks,
    Bhaskar

    Hi,
    I assume the following system situation exists:
    The new Infotypeframework NITF is inactive for PA30. Flag CCURE PC UI is activated in T77SO. You are using ESS based on Web Dynpro which uses the new Infotypeframework.
    Here we have to differentiate between infotypes which are participating in the data sharing functionality and all other infotypes. Such as:
    Infotypes without Data Sharing:
              - Infotype checks     => module pool
              - Infotype update     => SAPFP50P/SAPUP50R
    Infotypes with Data Sharing:
              - Infotype checks     => module pool
              - Infotype update     => NITF
    ATTENTION:
    BAdI HRPAD00INFTY is not processed in this case (importing parameter NEW_IMAGE is always space). Instead the BAdI HRPAD00INFTYDB of the NITF is been processed.
    The following notes (1 and 2) will solve the problem. Note 3) solves an involving problem caused during the deletion process of a personnel number.
    1) 783499 - Incorrect framework synchronization
    2) 845592 - Incorrect framework synchronization - Retroactive accounting
    3) 844998 - PU00: Termination when deleting a personnel number
    Hope this will help!
    Regards,
    Sibylle

  • How to get max date in variable using  dynamic query

    Hi,
    the following code gets all dates from sourcetable i want only max date , so i thought max function can be added and it will work
    but still i have to create a table for one value(scalar) can get it in any other effeciant way.
    declare
    TYPE date_string IS TABLE OF VARCHAR(1000);
    date_obj date_string;
    BEGIN
    EXECUTE IMMEDIATE 'SELECT to_char('''||day1||'-'||month1||'-'||year1||''') FROM '||source_schema||'.'|| sourcetable ||'' bulk collect INTO date_obj;
    FOR indx IN date_obj.FIRST..date_obj.LAST loop
    dbms_output.put_line(
    date_obj(indx));
    END loop;
    DBMS_OUTPUT.PUT_LINE('Sample output');
    END;
    yours sincerely

    944768 wrote:
    the following code gets all dates from sourcetableNo it doesn't. What is the datatype of day1, month1 and year1? They cannot be DATE datatypes otherwise your TO_CHAR would fail with all that concatenation going on. And your TO_CHAR is returning a VARCHAR2 datatype... so you cannot say that it is getting all dates... because there are no DATE datatypes returned. It's getting a lot of strings, but certainly not DATE's.
    i want only max date , so i thought max function can be added and it will work You can use the MAX function on a DATE datatype, but not on strings (at least not in the way you intend it to work).
    Converting it to a DATE before doing the MAX will allow you to get the maximum date (assuming the date format is correct)
    EXECUTE IMMEDIATE 'SELECT max(to_date(to_char('''||day1||'-'||month1||'-'||year1||'''),''DD-MM-YYYY'')) FROM  '||source_schema||'.'|| sourcetable ||'' bulk collect INTO date_obj;Then you will find have the other issues...
    a) you are then going to be fetching your DATEs in to a collection of VARCHAR strings. (Not even VARCHAR2, very poor). This should be DATE datatype
    b) you are bulk collecting into a collection, when you are using MAX which will return a single value in your example
    And you really should address the design issues:
    c) why are day, month and year, not being stored in the database as a single DATE datatype in the first place
    d) why does your code not know the name of the table it's querying requiring the use of very poor dynamic SQL techniques.
    e) why are you loading data in a collection in expensive PGA memory... what can't you do in SQL that requires you to collect the data into memory first?

  • Getting junk data in the output file in UNIX server due to UNICODE error.

    Hi All,
    I am working on an Upgradation project from 4.7 to mySAP ERP 2005.
    IN 4.7 we are using
    OPEN DATASET lv_filename FOR OUTPUT IN   BINARY MODE. and getting the file as required.
    In ECC 6.0 for the same OPEN DATASET statement ,the output file in unix server has the junk data having the characters like #<##d9{y#+G9###T>j(##^# #K## #q### #####.
    Pls help me in this issue to proceed further .
    Thanks,
    Chakradhar.

    Hi Markus,
    Below are the files data in both environments.
    In ECC 6.0
    001B2274001802007051                                 0  20070519CTLMEA      RPTIME00043900 #
    ###9##;c_5####Tj#y#.##'###u###<#<##d9{y#+##G9###T>j(###^###K####q##########C##dA4####&#1393;###x##
    R[#!#J##&#1698;w###u#-C#'Qho#&#31632;}j##w%##/#'ZhW##s###n&#1080;#&#1723;>-J#####&#1046;#tP}##Hu#}Q7###Sh_###C4<3nqk##i l#
    ####{############Qns###;####p##{si##y##@##&#1008;0####C###,###2&#973;#j&#830;########Q#f####;)k>lO#5#n###&#1852;#
    ####M##S##IM#z0#o##&#1325;####!#V#9###&#1722;#?s##[#####V&#&#756;s#&#56196;&#56590;[#l#s##&#48610;:#&#1334;{&#548;&#55960;&#57086;M-##v@#########v#&#2034;###s##
    9Q##!#d#####`#############Lc####J#######%?######E#HV3#(#N####Wl####}S#O######zA[##m####u/7#T
    ##2#s##Q#umF]##Z###}##&#1858;###a######z1#`#####&#46110;-###Q#o#####Q###x#######7Z[##?#V#e##nI####O1=u[#
    ##p##Kj#####]#####/5#20{####&#1244;##x##A#?###xa##/<^#Rj&#16741;#######xI#+j#%###$##$######p=##V#&#1290;
    #######k#K##yI#yI#!/)#y#z##-y######"/#e&#1717;##/############*###"/_##-##+##/#y9#####5#9/#yI#A#
    ###################J/yih=####u4i#K##t####&#1822;######=##AX###J##z#####KC&#48084;## /###G{#K#####
    In 4.7
    001B2274001802007051                                 0  20070519CTLMEA      RPTIME00043900
    ãÔ?®zåÖ#Iï-_Î-ør7##*Ódöã ²äÐÁSjòä`ëÏ©"yÿï¾E#[µºEW#g#2éu##a±¸u~#ZäTéR¯F&o#C·¼åÈÝÁ%½ß´y6+##¿
    íE#z!#â#ùG#>{#éJæ##jÅSM<±òxwÆüI¾jâ#µ#ù
    íQ ÕÈ###dÝ#/«#ycãA¼#ø#7#¿#¼#íxãý#y«#o#â¡ùéËÖ_C¼½À4ðÀó#Ð8?qÊ#O½Î¿_##b#xjÛÓ#OÜ#×gÌ#×ós##
    í¡ùh¿~ëÊÓü#ò#'¡#Á#â©#<áoú#'Ô®ü#»L»þ#y)hà#ç#Z[¡#'®Uy1?YC<Ýú#iÇÇ###Íç'Ô#§#Ù#O§#f<###B{#§##ñ
    #0H}¬#^##6¨7V¨7VÚX#M9&#A#øG º'õxOù§ø #W¨Å+Ðb#ÉÇ7#SôRXß\u00A7à#wE"#mê#óÀd# ¼##gn###:ô#E<#######ú
    ûJ¦H}#·¦Y½â>ºbò#xSSÿÿÕ«óG#ï#6²f´Ú¾fyqèhJÖçCOr´#Ý#S?##KËÄ×mâë¶x)º×ªh2Åw8&í####7 `Ùo#ö»#òöw$
    ½##Gê#ì#»#La)ì##Ý÷#{7í´éã»##ãî]¾[##{O#¾C##£¶G#û¼Eû#dL#ª:#PÉEÉ>Ó##ª:G#éaR^·BEµÏ+¹###y#N##ȱ
    DÕ##5#"9Ní>#íFo##kp#ÂðÆè5¿ð½F®¯M##þð1#îi##Z #Z #Z#ô-¾#§èH»û¹ö9é#Ôä#001B2274001802007051
    èÁ##<(#ÿ#¢²ÿ#è#éc#z¾vçÌá#¹#ý#x%ìÜ#çÌ##ùÍÙ#¹{ǯepmâí#¸Ö##¸=ÝÙ½¹uë·,ù#þ¼øl###£åg#,##-`q#ÿøæï
    viÁ#]3#.O#þÊöèR##=##L#LÊk###¤à##ó#'V052 øé]+####ã!ÁC#s#q###åLj##Á¯Æ4#.àíT#¸Þ¹µ·¶É)ç#Ïå#<#/ð
    Thanks,
    Chakradhar.

  • Max Date function by Group is not catching a Null Date

    I have a query that returns the MAX CLINICALDATE. It is worknig great except if their is no CLINCIALDATE then it doesn't bring that group back and it needs to. Thank you for your help.
    SELECT PERSON.MEDRECNO, MEDICATE.INSTRUCTIONS, PERSON.LASTNAME, PERSON.FIRSTNAME, MEDICATE.STARTDATE, MEDICATE.STOPDATE, MEDICATE.STOPREASON, MEDICATE.DESCRIPTION, PRESCRIB.REFILLS, PRESCRIB.QUANTITY, PRESCRIB.CLINICALDATE
    FROM
         ((ML.MEDICATE MEDICATE
    INNER JOIN ML.PERSON PERSON ON (MEDICATE.PID = PERSON.PID))
         LEFT OUTER JOIN ML.PRESCRIB PRESCRIB ON (MEDICATE.PID = PRESCRIB.PID)     AND (MEDICATE.MID = PRESCRIB.MID))
         LEFT OUTER JOIN ML.USRINFO USRINFO ON (PRESCRIB.PVID = USRINFO.PVID)
    WHERE PERSON.MEDRECNO='20-14-38' AND (MID, CLINICALDATE) IN
    (SELECT MID, MAX(CLINICALDATE) FROM PRESCRIB GROUP BY MID) and (STOPREASON is null or STOPREASON = ' ') and (MEDICATE.STOPDATE = to_date('4700-12-31 00:00:00', 'yyyy/mm/dd hh24:mi:ss'))
    ORDER BY MEDICATE.DESCRIPTION

    As stated when entering the forum, SQL Developer is a tool; you want the SQL And PL/SQL forum instead.
    Regards,
    K.

  • Get modified date inside the File content of CM

    hi,
    In CM I have uploaded a file and have set the permission to modify the file to a group of users.Now when each and every time any user modifies the file content I want to have the modified date inside the updated file.
    How can i achieve this?.....
    Please help.....
    Thanks in advance,
    shami.

    Hi All,
    @Parvathy:There is no such property on your files, you should create one in your filter and depending on this custom property your filter should decide if a document update is required or not.
    As already said follow this:
    You have a content filter which can do updates to these files:
    -- Content filter sets a custom property new_modifieddate on each resource after updating resource. (new_modifieddate==cm_modified of resource)
    -- It compares new_modifieddate with cm_modified of resource to determine if it should update the resource with cm_modified.
    @Shami: Use some logging in your Filter code, so that you can make sure your code is being executed. One more way is to dubug you code by setting break points in NWDS (Ofcourse the server should be in debug mode for this option).
    logging :
    http://help.sap.com/saphelp_nw2004s/helpdata/en/a0/58db515b95b64181ef0552dc1f5c50/frameset.htm
    debug:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/5d/31e540b1278631e10000000a1550b0/frameset.htm
    Greetings,
    Praveen Gudapati

Maybe you are looking for