Getting Last comment filed

I want last updated row for this record 24763
nc_comment_id nc_id
nc_user_id nc_comment_added_by
nc_comment nc_comment_added_on
1 24763
2051 Amit sharma
nc created 2013-09-23 17:45:00.000
2 24763
2051 Amit Sharma
nc updated   2013-09-23 17:45:00.000
44 24763
2051 Pravin
NULL 2013-10-22 12:13:48.000
45 24789
2050 Arun
nc_created 2013-10-22 12:13:48.000
I want this record with sql query
44 24763
2051 Pravin
NULL 2013-10-22 12:13:48.000
Amit Sharma Software Developer 3 to 4 year Exp

Try the below(Not tested)
Select * From
(Select *, ROW_NUMBER()Over(partition by nc_id order by nc_comment_added_on desc) rn
From Tablename where nc_id = 24763) A
Where rn=1

Similar Messages

  • Get last Trouble Ticket analyst Comments by orchestrator

    Hello all, I make this runbook for getting Trouble Ticket analyst Comments and sending it by email, but how many comments in the incident, many times to send mail, example, count Comments in incident 10, email send 10 times.
    How to get last Trouble Ticket analyst Comments by orchestrator without smlets ?

    After the monitor you must use Relationship activity to retreive the source incident.
    On the "Get object" related the the incident you can use filters.
    The first filter is the GUID and after you can apply the filter that you want.
    Remy BOVI

  • How to sort (to display the last comment) a comment in a web template

    Hi,
    I need your help regarding how to display the last comment of a report in a web template, comments managed via the content module com.sap.ip.bi.rig.DocumentContent.
    Summary of the customer need :
    the customer wants to manage comments for a report. The customer does not want to comment each line of a report but  comments in a report as a whole, we want to display the last comment (among all comments) in the web template.
    What I have done so far :
    I have implemented the paper "Maintaining and Printing Comment for Each Line in the Report" ( http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/a046a839-f000-2d10-67af-b53d73894a75), and I have adjusted it to my needs : now I can enter several comments for a report, I can display them via the context menu.
    BW displays only one comment within a web template via Document Content moduleu201D (com.sap.ip.bi.rig.DocumentContent).
    The documents are created under KM, and I can saw them (as administrator) in the KM repository, under the folder /bw_document/InfoProviderData ... OK.
    What I can't get through :
    I want the web template to display the last comment (not the first)  but the web template stills display the first comment. We think it's a sorting issue or a display option (The web template always display the first comment created)
    We tried to maintain portal and KM customizing without success (in the portal System Admin -> System Config -> KM -> CM -> UI -> Settings -> Collection Renderer Setting for example). We think we can get through by java script coding in the web template, but we don't know how to do it. Maybe we have not reach the right option in KM customizing ?
    have you ideas to resolve this issue ?
    Thanks in advance,
    Laurent

    We have found a work around solution, by managing IP functions in the web template... to force BW to sort the items as we want.

  • How Get last five quarters data using ssrs expression

    Hi All,
    i have an ssrs report where i have to get last five quarters data  and also last five months data when i select quarterly/monthly parameter.....
    is there any possibilty that we can get this using ssrs expression
    any help please.........

    Hi Mr.SMK,
    According to your description, there is an SSRS report, you want to create a parameter, when you select quarterly, data of last five quarters will be displayed. If you select monthly, data of last five months will be displayed. If that is the case, please
    refer to the following steps:
      1. In design surface, in Report Data pane, right-click Parameters and click Add Parameter.
      2. Type parameter name and prompt, set Data Type to Date/Time.
      3. Click Available Values in left pane, select Specify values.
      4. Click Add button, in Label text box, type Quarterly, then click (fx) button and type the expression like below:
    =DateAdd("q",-5,Today())
      5. Click Add button, in Label text box, type Monthly, then click (fx) button and type the expression like below:
    =DateAdd("m",-5,Today())
      6. Right-click the dataset used to retrieve data for the report and open Dataset Properties dialog box.
      7. Click Filters in left pane, click Add button, select Data from Expression drop down list, set Operator to >=, in Value text box, type [@ParameterName].
    The following screenshots are for your reference:
    If you have any more questions, please feel free to ask.
    Thanks,
    Wendy Fu
    Wendy Fu
    TechNet Community Support

  • Getting last day of the month

    hi ,
    is there an existing date funtion to get last day of the month ?
    pls advise
    else
    i'll try to add_month + 1 to current month and format to the first day and minus 1 day from that new month
    tks & rdgs

    last_day function
    <br>
    jeneesh

  • Hi all, can someone help me in getting last login date of a user in CQ5 please?

    Hi all, can someone help me in getting last login date of a user in CQ5 please?

    CQ is REST based and does not have the concept of session. So there is no feature to track login or logout details.  Most of our customers use some kind of central authentication Ex- SSO hence no need arises to have such functionality built in.  However if needed you have the ability to implement such at a project level solution. Ex:- custom login modules or auth-handler by taking project specific constraints and requirements into account

  • How to get last modified date and time of a file which is in apache server.

    Hi ,
    I need to get last modified date and time of a file in remote machine.
    This file is in remote machine which has apache server installed.
    I am trying to get this information by connecting to apache server from client by giving absolute URI of the file to file object.
    URI is got from apache server URL by using toURI method.
    when I use lastModified method , its throwing exception , because scheme of URI is not file.
    I can't give scheme as file because ftp server is not installed on that server
    Is there any other way to get this information .

    No, unless you can use an FTP client.

  • How to get last Build date of a dll in the real time target

    Info On My Project    
       I am working on LabWindows CVI 12.0 for development . This project is a real time application for hardware, which is having Phar Lap ETS as RTOS...  
    I am facing some problems while checking Build date of my Application file( .dll)
    I have tried to use GetFileDate API. But it is not supporting for realtime Target..
    So i have tried __DATE__ macro.. That also having some problems..
    How to get last Build date of a dll from the real time target  ??
    Please Help to solve this....
    Thanks
    Vaishakh A  K

    Please reply if any one have suggestion...

  • To get last year Net Value by fiscal period

    Dear experts,
    Since yesterday am trying to get solution where still unable to succeed.The report requirement is that they need Planned sales and actual sales qty of current fiscal year/period wise and in first column to get last year Actual sales for same period.(Ex:009.2006 to 011.2006 is input and in first coloumn 009.2005 to 011.2005)
    This is the situation:
    I have kept restricted W2 for fiscal year varient in filter and have created quantity sales(for last year) RKF with variable as "From fiscal year/period-13 and To Fiscal year/period-1"(with offset) and have placed in Key Figure structure in column section.Above this Structure have kept Fiscal year/period info object with variable "From Fiscal Year/period to To Fiscal year/period.This is because i need period wise breakup.
    I understand that above we have "From Fiscal year/period infoobject" and below that in key figure structure u have the above quoted key figure with quantity sales of previous year.I want period wise it has to show me last year(period wise) quantity with current year Planned aty and sales Qty
    Have gone through all threads and now it feels that i should to for variable exit ?...Do i have any option apart from variable exit?...If so could anybody can provide code for the same...Kindly gimme solution.
    Maximum points will be awarded..
    Thanks and Rgds
    Chandru

    Hi,
    I hope, you are entering  values 009.2006 to 011.2006 for the variable "From Fiscal Year/period to To Fiscal year/period". Am I right?
    If so, Donot restrict the fiscal year period with "From Fiscal Year/period to To Fiscal year/period like as you mentioned:--
    <i>Above this Structure have kept Fiscal year/period info object with variable "From Fiscal Year/period to To Fiscal year/period.This is because i need period wise breakup.</i>
    To get the break up Priod wise, taking Fiscal year period characterstics above  the structure is sufficient with ou any restriction.
    Under the characterstic fiscal year period take two KF (same kf called SALES QTY two times with different heading like " last year Actual sales" and "current year Actual sales ") . First KF will be restricted with customer exit varible on Fiscal year period characterstic. Second KF will be restricted with user entry varible on Fiscal year period characterstic.
    In case if you enter the value 009.2006 to 011.2006 as the iput to user entry varible, the code should generate the value 009.2005 to 011.2005 to Customer exit varible.
    With rgds,
    Anil Kumar Sharma .P
    With rgds,
    Anil Kumar Sharma. P

  • How to Get last page number in report 10g

    I want to get last page number in report but Current page number found from srw.get_page_num(n)
    but i want to get last page number for conditional formating like this
    srw.get_page_num(current_page)=last_page
    pls help me how can get last page number;
    pls help;
    thanks in advanced;

    Hi,
    you can use the Property Print Object On for this.
    Regards
    Rainer

  • How to get last geo position, after 24 hours offline?

    I lost my iphone 5. Then i use the app "find my iphone". And it told that its offline, and i coudnt see the last geo position. How can I get last geoposition?

    Unless you installed a "finder" app that would upload that information there is no way to get previous locations.

  • I brought in a slideshow but photos didn't include comments.  How can I get my comments imported along with the pictures?

    I brought in a slideshow but photos didn't include comments.  How do I get my comments?

    First make sure you've added the comments you want to show in the Add a Description field in iPhoto or in the Title field.  If you put them in the Title field and you envoke the feature in iDVD you won't have to delete the title from each slide to give you just the desciption.  Or batch remove the Titles from all the photos before you add them to the iDVD project. You can allways get them back with the Photos ➙ Batfch Change menu option later on.
    Click on the cog wheel menu button at the bottom and select Show titles and comments checkbox.
    Happy Holidays

  • Get last error 5

    I cant upgrade to itunes 10 "itunes cannot run because some of its files are missing, Please reinstall itunes" It wont let me deleate itunes i get the same message. Another error i get is "error getting file security C:\program files\itunes\cdconfigeration Get last error 5"
    Whats the deal?

    I was having this error too. The good news is I was able to fix it fairly easily. Here's how I did it:
    1: Find the directory in windows explorer (C:\Program Data)
    2: Right click on the 34BE82C4-E596-4e99-A191-52C6199EB69 directory and select properties.
    3: Select the 'Security' tab.
    4: In the 'Group or user names' box, there should be the following entries;
                                                                                                              SYSTEM
                                                                                                              Administrators (xxxx\Administrators)
                                                                                                              Users (xxxx\Users)
                                                 (where xxxx is the name of your computer)
    If these user names do not exist, create them by clicking on 'Edit' and then 'Add' and typing in the user name.
    5: Set the permissions for these user names (using the 'Edit' button) as follows;
                   SYSTEM - check all boxes except 'Special Permissions'
                   Administrators (xxxx\Administrators) - check all boxes except 'Special Permissions'
                   Users (xxxx\Users) - check Read & execute, List folder contents and Read.
    6: Rember to click 'Apply' after setting up each user name, and when you are done, just OK your way back out of the properties dialog box.
    7. Now try to update itunes.
    This fix worked for me
    I'm running windows 7, btw.
    Hope this helps.

  • How to get last row and sum of all columns in one query

    Hi ,
    is there a way to get last record for a column and sum of all record for another column in the same query.
    Best Regards ,

    You should define your requirements properly for volunteers to help here..
    Your data is not good enough to provide you accurate solution. Reason being you dont have a proper column which differentiates between first and last entry.
    The solution becomes easy based on your desgin.
    I have introduced a grouping column called "id" and a time column called "time_of_insert" (only this way you can confidently say that you can differentiate between first and last (also a fool proof solution) --- you may optionally use sequence(instead of date though if you say you may end up inserting two rows at the same time, then probably sequence would be a better choice to differentiate rather than a timestamp field) etc...)
    With your sample data something like this can be done to achieve your desired result.
    WITH dataset AS
            (SELECT 1 id,10 used, 8 remain,systimestamp+1/24 time_of_insert FROM DUAL
             UNION ALL
             SELECT 1 id, 1, 7,systimestamp+2/24 FROM DUAL
             UNION ALL
             SELECT 1 id,2, 5,systimestamp+3/24 FROM DUAL
             UNION ALL
             SELECT 1 id,1, 0,systimestamp+4/24 FROM DUAL
             UNION ALL
             SELECT 1 id,0, 0,systimestamp+5/24 FROM DUAL
             UNION ALL
             SELECT 1 id,1, 4,systimestamp+6/24 FROM DUAL)
    SELECT *
      FROM (SELECT SUM (used) OVER () sum_all,
                   FIRST_VALUE (remain)
                      OVER (PARTITION BY id ORDER BY time_of_insert DESC)
                      last_row
              FROM dataset)
    WHERE ROWNUM = 1;
    Output:
    SUM_ALL       LAST_ROW
    15                  4
    Cheers,
    Manik.

  • How to get Last Day of a Previous Month

    Hi all,
    I need to get Last Day of the Previous Month. I am able to get Current Month Last Day using Calendar.getActualMaximum(Calendar.DATE)
    But I need previous Month's Last Day.
    Thanks
    Vamshi.

    Thanks all....
    I have been trying the same and could get it.....
    here is the code for that....
    SimpleDateFormat simpleDate = new SimpleDateFormat("MM/dd/yyyy");
    Calendar calendar = Calendar.getInstance();
    month = calendar.get(Calendar.MONTH);
    //year = calendar.get(Calendar.YEAR);
    calendar.set(Calendar.MONTH, month-1);
    calendar.set(Calendar.DATE, calendar.getActualMaximum(Calendar.DATE));
    //lastDayOfMonth = calendar.getActualMaximum(Calendar.DATE);
    System.out.Println("Previous Month End Date is :: " + simpleDate.format(calendar.getTime()));
    this works....
    thanks for ur replys....

Maybe you are looking for

  • How do I completely remove all of firefox and give it a clean install?

    Every time I go to yahoo.com one of the plugins I have installed crashes firefox. I can't quite figure out which one it is, I deactivate them or run FF in safe mode and it still crashes. I've uninstalled FF and reinstalled with the newest version and

  • Bank Payment with Three currencies at a time

    Good afternoon Iu2019m looking for someone that would know if SAP Business One could handle three different currencies from a Bank payment perspective, meaning that I have ZAR set as my local and system currency and my bank account is a USD currency

  • Splitting an event

    I have researched this, read the iMovie help, and still cannot figure this out. I want to split an event. When I follow the instructions all it does is duplicate the entire event. I am selecting the portion I want split...I go to File>Split event bef

  • Add parameter in jasper report query string

    Dear Experts, i developed a pdf report using jasperreports . in this reports i used a query string where dont have any parameter, now i want to add a parameter between querystring. how can i do this?? (i know another solution and that is using jrData

  • JSP / SQL Server / Widows 2000

    Can anyone provide a list of things to check in getting a JSP with a Database Connection to SQL Server 7 database on Windows 2000? I keep getting this error message: javax.servlet.ServletException: Unable to load class com.microsoft.jdbc.sqlserver.SQ