Last 100 rows of a database

I have an application which needs to connect to a database and retrieve the 100 most recent rows and display them. Now the problem is that this operation must happen every 3-5 seconds. How could I perform this operation? Do I have to use a scrollable resultset and start counting from rs.last() upwards? How can I make more efficient?
Thnx

The DSP card is connected on a PCI slot on the machine that holds the database hence no network bandwidth concerns there. This database is mirrored on another server where more HDD space is available. The machine that holds the DSP is only a 1U rack so not a lot I can do on it.
My solution was to mirror the data on the second machine and delete the data from the first one every few days. The DSP produces about 3GB of data per day and the system will be monitored for the next 5 years aprox. That about 5TB of data. These data will be processed during this period of time which is adequate enough but there is still the need to hava some sort of almost real-time graphical representation of the data as they come in.
The main table of the database has 40 columns each one holding data gathered from its corresponding sensor. All rows are timestamped with a resolution of 1millisecond (it is possible to make it accurate to 100nanoseconds) and this column is indexed as well plus there is also a sequential ordered index as well.
The data coming in are just integer numbers with not more than 3-4 digits. This means that each row holds much less than a 1kilobyte.
By the way the database is MySQL
A better solution, if the database supports it, would probably be the second table approach. A scheduled stored procedure would move the data and clean the second table every 3 seconds. This would have only one hit on the main table. Then the clients hit the second table.How would I go about doing this? Any suggestions? How can I use scheduled stored procecdures? Any links apreciated
You could probably also cache the data off the database entirely. That will impact the network bandwidth. But it should lessen the impact on the database resources (and I would not be sure which is best.)This sounds interesting as well, I would be grateful for any more info on how to cache data off the database.
And now a different question...
I've programmed some code to use to mirror the database. What I did is get the two connections to the databases and then use SELECT * FROM TABLE. While on the while loop on the result set I insert each row to the second database. At the end I delete the data from the first one.
Of course this solution only works when having a small number of rows. When trying to mirror a whole days worth of data (3GB) I get a nasty out of memory error since my (stupid?) solution loads the entire result set in memory before even beginneing to insert the rows.
I was wondering if there is a method of doing this in parts of lets say 50,000 rows each time until all of it is mirrored. Or maybe another way without all the result set being loaded in memory.
I have heard of setFetchSize() but I do not know if the JDBC driver that comes with MySQL supports it and even if it does I wouldn't have a clue on how to use it.
I know there are other ways of mirroring a database but it would be really helpfull if I could do it programatically.
As you probably guessed I am not a programmer but I thought my little knowledge of Java was enough to be able to use it constructively on this scientific experiment.
Any suggestions, comments or links that would help clarify or solve the above problems really appreciated. And thanks for all the feedback so far
Best regards,
Stefanos

Similar Messages

  • How to get the last row of a database table.

    HI ,
    I want to get record exactly from the last row of a database table.
    How is that possible?

    Hi,
    To fetch last record from an internal table, just do find the number of records in it and read using index.
    DESCRIBE TABLE ITAB LINES L_LINES.
    READ TABLE ITAB INDEX L_LINES.
    You can also use LOOP .. ENDLOOP but the above method is better (performance wise).
    using LOOP .. ENDLOOP.
    LOOP AT ITAB.
    **do nothing
    ENDLOOP.
    **process ITAB (Header record of ITAB).
    **after ENLOOP, ITAB will have the last record of the internal table.
    [here ITAB is internal table as well as header record.]
    But what is the requirement?
    If you are looking for the current record of an employee then you can use ENDDA = HIGH_DATE.
    My advice is to review your requirement again and try to fetch only that record which you need.
    Mubeen

  • How to delete duplicate rows in oracle and retaining last duplicate rows

    Hi,
    I'm having millions of records in the table .Some duplicate values/rows are inserted in it.
    I just want to delete duplicate rows but also want to retain the last duplicate row.
    For eg if one record is found three times ,i want to delete first and second record and retain
    the third one i.e the last inserted one.
    Regards
    Paramdeep Singh

    user13310594 wrote:
    Hi,
    I'm having millions of records in the table .Some duplicate values/rows are inserted in it.
    I just want to delete duplicate rows but also want to retain the last duplicate row.
    For eg if one record is found three times ,i want to delete first and second record and retain
    the third one i.e the last inserted one.Hi Paramdeep,
    To start with, since you do not wish to keep multiple rows with same values, why allow them to get inserted in the first place?
    Wouldn't it be easier to block duplicate rows from inserting by creating a Unique constraint on Column(s) that define a row as duplicate, then rather deleting duplicate rows periodically?
    For deleting duplicate rows, there are N number of techniques available. Always remember, you need to have a rigid criteria that marks row as duplicate.
    [url http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:15258974323143]this is one recomended by tom for large tables.
    Vivek L

  • "Powermaps needs more resources to complete this operation" error. 2 datasets 100 rows. one tour. two layers

    I'm working on some BI mashups to demo the powerbi offerings to potential clients, but I get close to 20+ crashes a day relating to memory issues
    I'm utilising powerquery to import and filter data from 2 rss feeds. Each are at most 100 rows. I then add these to a powerpivot model & have two powerview reports over this.
    I've added a powermap to the solution but find the reliability to be very poor. If it does manage to work the colours of the bubbles and bars sometimes don't match the defined colours or they're black (a telltale sign of memory problems in windows). This
    usually breaks the whole excel 'process' and I can't save the workbook. I get "workbook not saved" errors or that "there was a problem saving with all the features added. Click continue and save as a different file"
    either that or i get a hard crash like I did while writing this post:
    Problem signature:
      Problem Event Name:    APPCRASH
      Application Name:    EXCEL.EXE
      Application Version:    15.0.4535.1507
      Application Timestamp:    52282875
      Fault Module Name:    KERNELBASE.dll
      Fault Module Version:    6.1.7601.18229
      Fault Module Timestamp:    51fb1116
      Exception Code:    e0434f4d
      Exception Offset:    0000c41f
      OS Version:    6.1.7601.2.1.0.256.1
      Locale ID:    3081
    Additional information about the problem:
      LCID:    1033
      skulcid:    1033
    Read our privacy statement online:
      http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409
    If the online privacy statement is not available, please read our privacy statement offline:
      C:\Windows\system32\en-US\erofflps.txt
    Memory amount is not a problem according to resource manager; excel process taking ~500mb and 70% free ram. I left memtest86+ running overnight and it found no errors in 8 passes so it looks like my sticks are ok. I have sql server 2008r2 & 2012
    along with all the bells (db engine, ssis, ssas) installed and that never gives me hard memory failures even when I drive it hard. Obviously if i try to process a data model that's too big it gives me out of mem errors but that's expected and it doesn't crash
    SSDT or the SSAS\Tabular instance. The services are off while I'm doing the excel powerbi work.
    laptop specs are :
    OS Name    Microsoft Windows 7 Ultimate
    Version    6.1.7601 Service Pack 1 Build 7601
    Other OS Description     Not Available
    OS Manufacturer    Microsoft Corporation
    System Manufacturer    Dell Inc.
    System Model    XPS L521X
    System Type    x64-based PC
    Processor    Intel(R) Core(TM) i7-3612QM CPU @ 2.10GHz, 2101 Mhz, 4 Core(s), 8 Logical Processor(s)
    BIOS Version/Date    Dell Inc. A15, 1/08/2013
    SMBIOS Version    2.7
    Windows Directory    C:\Windows
    System Directory    C:\Windows\system32
    Boot Device    \Device\HarddiskVolume1
    Locale    Australia
    Hardware Abstraction Layer    Version = "6.1.7601.17514"
    Time Zone    Cen. Australia Daylight Time
    Installed Physical Memory (RAM)    8.00 GB
    Total Physical Memory    7.88 GB
    Available Physical Memory    5.67 GB
    Total Virtual Memory    15.9 GB
    Available Virtual Memory    13.6 GB
    Page File Space    8.00 GB
    Page File    C:\pagefile.sys
    I can upload the workbook too if desired
    I dont solely blame powermaps, rendering the powerview reports is pretty hit and miss in all the workbooks i've developed before as well, but clicking the Maps button in excel is certainly the biggest gamble
    Jakub @ Adelaide, Australia

    Hi Jakub,
    I can think of two changes you can make that can help.
    1. You don't mention what architecture your office version is. I would suggest you use 64 bit Excel. It has a higher memory threshold and performs much better when using a lot of memory.
    2. Install all of the latest CU updates for Office. There has been dozens of bug fixes for PowerPivot and Power View since the last release.
    You mention you can share the workbook. Feel free to send to me at
    [email protected] and I would be willing to take a look and see if the crashes are known issues or already fixed.
    Brad Syputa, Microsoft Reporting Services This posting is provided "AS IS" with no warranties.

  • Comparing textbox to a set number of rows in a database

    Hi
    I'm wondering if anyone can help me with a litle problem. I got this code:
    Dim con As New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\MyDatabase.accdb")
    Dim cmd As OleDbCommand = New OleDbCommand("SELECT * FROM produced WHERE serie = '" & SerieTextBox.Text & "' AND where = '" & WhereLabel2.Text & "'", con)
    con.Open()
    Dim sdr As OleDbDataReader = cmd.ExecuteReader()
    If (sdr.Read() = True) Then
    MessageBox.Show("It exist in " & WhereLabel2.Text)
    con.Close()
    Exit Sub
    Else
    MessageBox.Show("It does not exist in " & WhereLabel2.Text)
    con.Close()
    Exit Sub
    End if
    This works perfectly :) The thing is, the produced table contains close to 90.000 rows (and growing), and there are no reason to compair the textbox to more than the last 1000 rows. Is there an easy way for me to that? I'm a bit worried about performance
    if I leave it like this.
    Any tips or help is much appreciated :)

    Hello,
    I am going to provide an example but highly recommend you step back and learn first how to work with SQL outside of Visual Studio then take time to learn the basics of working with VB.NET basics followed by working with data at a simple level.
    In
    the project on OneDrive I did the following
    Separated the database operations into a code module, could had gone one step farther and placed the code into a class but wanted to keep it simple
    In the code module mentioned above there are two functions, the first has hard coded values used which in this case validates the query works properly. Thinking from experience what I did is write the query in (for this example) MS-Access query editor,
    does it work? Yes, move to a project, if not continue in MS-Access until it does.
    Test in Visual Studio project
    Now modify the code to accept replaceable parameters for the where conditions and test via values sent via TextBox controls from the user and while doing so it is prudent to test if they actually entered values in the TextBox controls.
    There are little things to look at in the code, study both functions to see things like being cognitive in regards to cleaning up objects (not obvious that the 'Using' statements do clean up but they do) . There is no exception handling, for live work
    you might consider this via a Try-Catch-Finally statement but was kept out to keep things simple.  
    Code from project
    Form code
    Public Class Form1
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
    If HardCodedTestDemo() Then
    MessageBox.Show("Got some")
    Else
    MessageBox.Show("None")
    End If
    End Sub
    Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
    If Not String.IsNullOrWhiteSpace(txtContactTitle.Text) AndAlso Not String.IsNullOrWhiteSpace(txtCountry.Text) Then
    If RealDemo(txtContactTitle.Text, txtCountry.Text) Then
    MessageBox.Show("Got some")
    Else
    MessageBox.Show("None")
    End If
    Else
    MessageBox.Show("Please enter both title and country")
    End If
    End Sub
    End Class
    Code  module
    Module DatabaseOperations
    Private Builder As New OleDbConnectionStringBuilder With
    .Provider = "Microsoft.ACE.OLEDB.12.0",
    .DataSource = IO.Path.Combine(Application.StartupPath, "Database1.accdb")
    ''' <summary>
    ''' Here we have provided hard coded values known to exists for the where conditions
    ''' so that we know it works.
    ''' </summary>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Public Function HardCodedTestDemo() As Boolean
    Using cn As New OleDbConnection With
    .ConnectionString = Builder.ConnectionString
    Using cmd As New OleDbCommand With {.Connection = cn}
    cmd.CommandText =
    <SQL>
    SELECT * FROM
    SELECT TOP 15 Identifier, ContactTitle, Country
    FROM Customers
    ORDER BY Identifier DESC
    WHERE
    ContactTitle ='Marketing Manager' AND Country = 'Germany'
    </SQL>.Value
    cn.Open()
    Dim Reader = cmd.ExecuteReader
    If Reader.HasRows Then
    Return True
    Else
    Return False
    End If
    End Using
    End Using
    End Function
    ''' <summary>
    ''' This version we pass in values that the user supplied from TextBox controls
    ''' on a form.
    ''' </summary>
    ''' <returns></returns>
    ''' <remarks>
    ''' </remarks>
    Public Function RealDemo(ByVal ContactTitle As String, ByVal Country As String) As Boolean
    Using cn As New OleDbConnection With
    .ConnectionString = Builder.ConnectionString
    Using cmd As New OleDbCommand With {.Connection = cn}
    cmd.CommandText =
    <SQL>
    SELECT * FROM
    SELECT TOP 15 Identifier, ContactTitle, Country
    FROM Customers
    ORDER BY Identifier DESC
    WHERE
    ContactTitle = @ContactTitle AND Country = @Country
    </SQL>.Value
    Dim CompanyTitleParameter As New OleDbParameter With
    .DbType = DbType.String,
    .ParameterName = "ContactTitle",
    .Value = ContactTitle
    cmd.Parameters.Add(CompanyTitleParameter)
    Dim CountryParameter As New OleDbParameter With
    .DbType = DbType.String,
    .ParameterName = "@Country",
    .Value = Country
    cmd.Parameters.Add(CountryParameter)
    cn.Open()
    Dim Reader = cmd.ExecuteReader
    Dim Success As Boolean = Reader.HasRows
    Reader.Close()
    Return Success
    End Using
    End Using
    End Function
    End Module
    Note the SQL is done slightly different than I gave before, I broke it down to first get our results, top 15 then used the result to do the where conditions.
    IMPORTANT Some will tell you that MS-Access does not use named parameters as I have used, that is correct but it accepts them. Access uses ordinal position of how parameters were added. So why use named parameters? If you have a lot of parameters
    it makes for easier time to figure out issues or errors in the code. Also if moving to SQL-Server this is the correct syntax, not ? marker. 
    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem.

  • Last Inserted Row in a Table

    Hi,
    I want to select only the last inserted row in a table. Can anybody help me how can i get it.
    Eg
    select * from emp;
    empno ename sal
    12 abc 100
    13 xyz 200
    Now i have inserted a row as
    Insert into emp values (14,'Rohit',500);
    So i only want to select the last inserted row i.e.. empno 14 (in this case).
    Thanks
    Bye
    Rohit Taneja

    Thanks to all for replying.
    But the result is not which i desire.
    I have deleted the existing row in the same table as
    SQL> Delete from emp where empno = 13;
    1 row deleted.
    Then i inserted a new row as
    SQL> insert into emp values(10,'SRI',200);
    1 row created.
    Then i committed the work
    SQL> commit;
    Commit complete.
    But still am getting the last row as
    SQL> select * from emp
    where rowid=(select max(rowid)
    from emp);
    EMPNO ENAME SAL
    14 ROHIT 500
    as the solution.
    But here i am supposed to get the row with empno 10.
    I have tried both the queries and still geting the same result.
    Please look aat it again,
    Thanks in advance
    Bye
    Rohit Taneja
    Hi,
    I want to select only the last inserted row in a
    table. Can anybody help me how can i get it.
    Eg
    select * from emp;
    empno ename sal
    12 abc 100
    13 xyz 200
    Now i have inserted a row as
    Insert into emp values (14,'Rohit',500);
    So i only want to select the last inserted row i.e..
    empno 14 (in this case).
    Thanks
    Bye
    Rohit Taneja

  • When I run my query (below) I only get 100 rows returned.

    I am a little rusty with SQL so I think that I must be doing something simple wrong. Here is the query:
    SELECT Tagname, Value, DateTime
    FROM Insql.Runtime.dbo.AnalogHistory
    WHERE "DateTime" > 'February 26 2014 10:30'
    AND "DateTime" < 'February 26 2014 10:50'
    AND Tagname = 'T0201001'
    This is a wonderware plant historical database that collects analog data every 5 seconds.
    No matter the time frame, 5 minutes or 5 hours I get back 100 rows of evenly time spaced data.
    I went into the query options and edited them to no avail. I am sure that I could calculate how mainy rows I think that I should have and select that number but I assumed the given the date range it would figure that out by itself.

    I got the same result running:
    SELECT Tagname, Value, [DateTime]
    FROM Insql.Runtime.dbo.AnalogHistory
    WHERE [DateTime] > 'February 26 2014 10:30'
    AND [DateTime] < 'February 26 2014 12:50'
    AND Tagname = 'T0201001'I am running my query from Microsoft SQL Server Management Studio  10.0.2531.0.I have been running this DB since 2000 (obviously in older versions of SQL).The DB was developed out of corporate and we just add tags through the WonderWare InSQL Historianwe can access the data through several trending applications. I was just teying to directly access the datato do some analsys with the raw data. I did check the Query options in Microsoft SQL Server Management Studioand it didn't appear to help. I was assuming that there was some default limitation but could not locate a setting anywhere.

  • First And Last Visible Row - JTable

    I have a JTable on a ScrollPane backed by a TableModel, which provides a view on a potentialy large database table. It would be very helpfull if I could find the First and the Last visible row in the JTable every time it makes an elementAt request via TableModel interface, so that the cache underneeth the TableModel could make more intelegent descissions as to when to request more rows from the DB. I cant seem to see any methods on JTable or JScrollpane( and subclasses ) to acheive this. I would greatly appreciate any sugestions.

    use
    Rectangle rect = MyTable.getVisibleRect();
    Point point = rect.getLocation();
    int firstRow = myTable.rowAtPoint( point ) );
    point.setLocation( rect.getX() + rect.getWidth(),
                             rect.getY() + rect.getHeight() );
    int lastRow = myTable.rowAtPoint( point ) );

  • Query for last  n rows please

    Hi All,
    Can anybody give me a SQL Query which will select last n rows from a table.
    guess some time I see this query in this forum but forgot to note it down.
    Thanks in Advance
    [email protected]

    Hi All,
    There is a simple solution, which will be useful at some of the following cases.
    1) Find Top( or bottom) <n> rows.
    For e.g. Top 5 rows or Bottom 100 rows.
    2) Range of rows.
    For e.g. Row 11 to row 20. (which is required for displaying the dynamic pages on web search engines)
    We need to understand how Oracle processes the query.
    SQL>Select rownum, Ename, Sal from Emp;
    ROWNUM ENAME SAL
    1 A 1000
    2 B 800
    3 C 3500
    But, if we write the query in following manner, check the output to understand Oracle's query processing.
    SQL>Select rownum, Ename, Sal from Emp order by Sal;
    ROWNUM ENAME SAL
    2 B 800
    1 A 1000
    3 C 3500
    The above output makes it clear that the rownum is assigned to the array of output before sorting it.
    Therefore, if you have to use the rownum of sorted output, you will have to use the inline query.
    SQL>Select rownum, Ename, Sal from (Select Ename, Sal from Emp ) order by Sal;
    ROWNUM ENAME SAL
    1 B 800
    2 A 1000
    3 C 3500
    The above query can be used, but not for any kind of filter conditions. Please check the tricky part of this filter condition.
    SQL>Select rownum, Ename, Sal from (Select Ename, Sal from Emp ) order by Sal
    where rownum = 2;
    No rows returned.
    This is because the rownums are generated first, then the filter is applied for Each row.
    Therefore, if the rownum is 1 it is filtered out. Therefore, the second row becomes first row( rownum = 1) and again it gets filtered out.
    Therefore, here we need to use one more inline query.
    SQL>Select rnum, Ename, Sal from (
    Select rownum rnum, Ename, Sal from (Select Ename, Sal from Emp ) order by Sal)
    where rnum = 2;
    ROWNUM ENAME SAL
    2 A 1000
    Think, with this above discussion, you can generate any type of query.
    Regards.
    Yogesh D.

  • Siebel CRM Web services query limit 100 rows

    Hi everyone,
    A have an little problem here.
    I need get accounts, contacts and oportunitys from Siebel CRM in clound using SIEBEL web service query methods BUT this web service allow me only 100 rows per query and I need more because at this moment I am using ODI interfaces for load XML response file into database tables and ODI don´t have an loop and so on...
    My question is:
    Is possible eliminate this limitation in administrative painel or something like?
    Thanks in advice..
    José Rodrigo
    Edited by: user7286844 on 27/09/2011 14:07

    What version of Siebel are you using? There was a bug in some versions when session management was used but it worked okay in other scenarios, e.g., when the user id and password were passed in the URL. This bug (id 12-1KXYCJ7 and 12-1KXYCJ7) has been fixed (more than once by the look of it). I have not noticed the same in 8.1.1.1.

  • Rownum and last inserted row !!!!!!!!!!!!

    hi everybody,
    I am at present using oracle 8i Release 2. According to my knowledge and "Oracle 8 complete reference", when we use ROWNUM, the rownum is decided when the data is selected from the database. So when we use "order by" clause actually the rownum gets jumbled up.
    But to my surprise when i did something like this on my SQl prompt row num is acting very "innocent" :)
    <Code>
    1* select rownum, empno from emp
    SQL> /
    ROWNUM EMPNO
    1 7369
    2 7499
    3 7521
    4 7566
    5 7654
    6 7698
    7 7782
    8 7788
    9 7839
    10 7844
    11 7876
    12 7900
    13 7902
    14 7934
    15 1
    15 rows selected.
    SQL> select rownum, empno from emp order by empno;
    ROWNUM EMPNO
    1 1
    2 7369
    3 7499
    4 7521
    5 7566
    6 7654
    7 7698
    8 7782
    9 7788
    10 7839
    11 7844
    12 7876
    13 7900
    14 7902
    15 7934
    15 rows selected.
    </Code>
    As you can see rownum is ordered again .. m i missing something.
    B)
    Is it possible to get a row that was inserted last. Does oracle guarantee that data retrieval will be according to the time of inssertion !!
    Thanx in advance
    Chetan

    Rownum is decided afeter the complete execution of ur SQL statment (it includes ordey by, group by, where etc.).
    you can get the last inserted row using:
    select * from emp where rowid=
    (select max(rowid) from emp);
    Regards
    Riaz

  • Update 100 Row Data In One Time against a Code

    Dear Expert,
    How can I update a Master Data Row Table record using a particular code. Like I write a query Update Table Set U_UDF = 'Value' Where Code = 2
    U_UDF is the field of Master Data Row Table's field. There are 100 Row against code 2 & I want to update all row with same value but in one time only.
    How can I do that ?
    Plz help me.
    Regards

    Hi,
    Try this:
    SAPbobsCOM.GeneralService oGeneralService = null;
                                                    SAPbobsCOM.GeneralData oGeneralData = null;
                                                    SAPbobsCOM.GeneralDataParams oGeneralParams = null;
                                                    SAPbobsCOM.CompanyService sCmp = null;
                                                    SAPbobsCOM.GeneralData oChild = null;
                                                    SAPbobsCOM.GeneralDataCollection oChildren = null;
                                                    sCmp = SBO_Company.GetCompanyService();
                                                    oGeneralService = sCmp.GetGeneralService("UDO");
                                                    // Get UDO record 
                                                    oGeneralParams = ((SAPbobsCOM.GeneralDataParams)(oGeneralService.GetDataInterface(SAPbobsCOM.GeneralServiceDataInterfaces.gsGeneralDataParams)));
                                                    oGeneralParams.SetProperty("Code", ContractCode);
                                                    oGeneralData = oGeneralService.GetByParams(oGeneralParams);
                                                   // Add lines on UDO Child Table 
                                                    oChildren = oGeneralData.Child("CONTRACTDETAIL");
                                                    // Update an existing line 
                                                    oChild = oChildren.Item(LineId - 1);
                                                    DateTime dt = DateTime.Now;
                                                    oChild.SetProperty("U_STATS", "Terminated");
                                                    oChild.SetProperty("U_Updated", dt);
                                                    oChild.SetProperty("U_Remarks", "Service Terminated");
    //Update the UDO Record
                                                    oGeneralService.Update(oGeneralData);
    I have given you the sample. Just change it accordingly.
    Hope it helps.
    Thanks & Regards
    Ankit Chauhan

  • How to populate the last empty row in Excel without using Report Generation Kit

    I wrote  a Labview SUb Vi that uses Report Generation Toolkit that is not loaded on the test stand. I am looking to convert it from Report Generation Vi like New Report,  Append Table to Report, Dispose Report. The tunneling through all the report generation Vis seems extensive. Code is attached. Thanks, Greg
    Greg

    Thank you that was a big help...
    I used the Excel Forum to get a lot of great ideas.  My code is almost working.
    There is a 2-D String Array that represents the String data that I am exporting to the Excel File Sheet 1 - 5.
    I am attempting to determine the last populated row in sheet 1 then populate the next row of Sheet 1.  Since all 5 sheets are populated every time, I should not have to search every sheet for the last row.
    I am getting two row populated on sheet 1 with seeming the same data.
     I found an AXExcelWrite2D ArrayWorksheet.vi that I thought would work.  I think there is a Table  determination that is causing me problems.  The link is http://lavag.org/topic/13324-labview-and-excel-activex-or-ado/.  The Application Invoke Node has a convert formula with "FromReferenceStyle" with R1C1 Attached to it.   I am not sure what this function is doing.  When I try to bring the function help up, there is a missing file.
    I am including both the new active x vi and the report generation vi.   Report Generation VI works.
    I would appreciate any assistance I can get on this.
    Thanks
    Greg
    Greg
    Attachments:
    REPU Test Data Population using Active X Write Save.vi ‏92 KB
    REPU Test Data Population.vi ‏60 KB

  • How can I get only the last 2 rows?

    How can I narrow down a query to get only the last two rows in a table ?
    Thanks,
    Mohan

    Thanks a lot Ram for your suggestion but already I have a query which returns a set of rows, of which I would like to further filter and get the last two rows
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Ramanuj Bangad ([email protected]):
    try out something like this if it helps.
    Example:
    select * from users
    where rownum <= (select count(*) from users)
    minus
    select * from users
    where rownum <= (select count(*) -2 from users )
    <HR></BLOCKQUOTE>
    null

  • How to get the values of last selected row in Table?

    Hi,
    I have one editable table , where i have Create, Delete and Commit operation on it.
    When i am clicking on Create button it add new row to my table.
    But I want the value of my last selected row from the table in my Bean.
    Can anyone suggest me please....... its urgent
    Jdev:- 11.1.1.0.3
    Thanks,
    Ramit

    just get this code empTable is the table binding
                    RowKeySet rks = new RowKeySetImpl(); 
                    CollectionModel model = (CollectionModel)empTable.getValue(); 
          RowKeySet selectedRowKeys = empTable.getSelectedRowKeys();
          if (selectedRowKeys != null)
                Iterator iter = selectedRowKeys.iterator();
                if (iter != null && iter.hasNext())
                  empTable.setRowKey(iter.next());
                  model.setRowIndex(empTable.getRowIndex()); 
                  Object key = model.getRowKey(); 
                  rks.add(key); 
                    empTable.setSelectedRowKeys(rks); 
          AdfFacesContext.getCurrentInstance().addPartialTarget(empTable);
        public void setEmpTable(RichTable empTable) {
            this.empTable = empTable;
        public RichTable getEmpTable() {
            return empTable;
        }

Maybe you are looking for