Display the last few lines added
HelloCould someone help me how to prepare a select statement which show the last 10 added lines? I have the column with DATE format.
Best.
Hi Best
SQL > drop table t;
Deleted table.
SQL > create table t (t1 date);
Table created.
SQL > insert into values (sysdate) t;
1 line of creation.
SQL > insert into t values (sysdate + 1);
1 line of creation.
SQL > insert into t values (sysdate + 2);
1 line of creation.
SQL > insert into t values (sysdate + 3);
1 line of creation.
SQL > insert into t values (sysdate + 4);
1 line of creation.
SQL > insert into t values (sysdate + 5);
1 line of creation.
SQL > insert into t values (sysdate + 7);
1 line of creation.
SQL > insert into t values (sysdate + 6);
1 line of creation.
SQL > insert into t values (sysdate + 8);
1 line of creation.
SQL > insert into t values (sysdate + 9);
1 line of creation.
SQL > insert into t values (sysdate + 10);
1 line of creation.
SQL > insert into t values (sysdate + 11);
1 line of creation.
SQL > insert into t values (sysdate + 12);
1 line of creation.
SQL > commit;
SQL > select * from (select * from (select rownum, t1 from t by t1 desc) where rownum)<=10) order="" by="" t1="">=10)>
ROWNUM T1
------ ---------
6 24 AUGUST 09
8 25 AUGUST 09
7 AUGUST 26 09
9 27 AUGUST 09
10 28 AUGUST 09
11 AUGUST 29, 09
12 30 AUGUST 09
13 31 AUGUST 09
14-01 - SEP - 09
15-02 - SEP - 09
Please use above written request...
A P R I T S I N H A
Tags: Database
Similar Questions
-
How to scrolledPane/text box to display the last lines?
I have a JTextArea in a get.
I add to the text box and scrolls information off the visible portion of the screen.
How can I force the scrollbar to always display the last few lines at the bottom of the screen when they are added?
Thank you.See [url http://www.camick.com/java/blog.html?name=text-area-scrolling] text scroll area
-
Issues around scrolling on managers of blackberry is a real headache.
I would like to be able to add fields to the bottom of a Manager and have this field displayed on the merits without taking the focus to another control.
I'm looking for something similar to how works the yahoo chat window, for example.
I was not able to get the last label field added to the box to display.
Here is the code relavent I have:
//adds a labelfield and a nullfield to the display public void update() { UiApplication.getUiApplication().invokeLater( new Runnable() { public void run() { try { scrollingWindow.add(new LabelField("Hello1" + count) ); //add nullfield to facilitate scrolling NullField nullField = new NullField( NullField.FOCUSABLE ); scrollingWindow.add(nullField); count++; } catch( Exception ex ) { Dialog.alert( ex.getMessage() ); } } }); }
Any ideas?
Couple of quick things:
(1) you can make your LabelField focusable and save adding the NullFields
New LabelField ("Hello1" + count, Field.FOCUSABLE)
(2) have you tried to discover what field has focus, then set the focus on your new field, and then reset back to that he originated from?
-
For the last few weeks, whenever I close Firefox 18 (and more recently 19.0), I can't reopen the browser again. The application runs as if it is going to open, then stops and sits there. I had to resort to the re - install the browser every time now, very irritating. He remembers my tabs as they had been, that I want to. I used to open up to 40-50 tabs, but now made an effort to keep them below 20, thinking that it would help work more optimally. I'm tired of re - install the browser all the time. What should I do? Thank you
When this happens, check the Windows Task Manager to see if there is a hidden window or the firefox.exe process is at a standstill?
To open the Windows Task Manager, press Ctrl + Shift + Esc
On the Applications tab, look for any window with the icon of Firefox. See something wrong here? In another thread, users have reported finding what seems to be a rogue process. If you find something, try to select and killing using end task.
Under the processes tab, look for firefox.exe. According to the displayed columns, you can often see that the program is reading, writing, communicate or simply sitting there, doing nothing. If you have allowed time to stop Firefox and it crashes, you can select firefox.exe and click on end process.
After that, Firefox expected to start normally.
Please see this article for troubleshooting suggestions for when Firefox crashes out. https://support.Mozilla.org/en-us/KB/Firefox-hangs-or-not-responding#w_firefox-hangs-when-you-quit-it
A little luck?
-
Hi all
I have a questions. It is that I create a Subvi to my table and it can display the last value in the upper part. Below attached snapshots of my programming. I use a number random and STOP for control of you guys let see the whole process of what I want.
but when I change "constant true/false" and using a digital command. and I put it in my program. It won't list down the values and it will not display the most recent value at the top. What is the problem? I was stuck on this problem for a while.
and another question was how to keep the size of the list is constant? for example, I onli wants to view 30readings on my table. as the program continued to run, the oldest value will be overwritten. because if kept under my table more, means memory increase my programming and registration of cause late development. I do not want to happen. So is it possible to maintain the display of fixed table values?
Hi Isabelle,.
I think that the problem causes initialization of a register shift to void / vi. If you initialize a shift register, each time sub vi is called, he will replace value in the registry to offset with initialized value. Uninitialize a registry change to resolve a problem. I've attached a screenshot of my sub vi for your reference.
Sincerely, Kate
-
Last name in my contact list is not displayed. It's as if the list is long and will not display the last of them. Is there anyway to fix this?
Hello
1. are you referring to e-mail contacts or Windows contacts?
2. who is your provider of mail service?
3. using any e-mail client?
4. don't you make changes to the computer before the show?Suggestions for a question on the help forums
http://support.Microsoft.com/kb/555375The information is not sufficient to answer your question. Please provide us with more information to answer your question better.
-
How to get an average displacement of the last 5 lines that were NOT NULL?
I have a question involving a moving average, and it works fine using:
AVG (col_x) more (partition col_a, col_b, col_c lines between 5 preceding and 1 preceding arrested)
However, I want to change this option to give the average of the last 5 lines which were non-null. Does anyone know how to do?
For example:
create table sample_table)
col_a varchar2 (10),
date of col_b,
col_c number (2),
col_x number (5.2)
);
insert into sample_table values ('X', trunc (sysdate), 1, 1);
insert into sample_table values ('X', trunc (sysdate), 2, 2);
insert into sample_table values ('X', trunc (sysdate), 3, 3);
insert into sample_table values ('X', trunc (sysdate), 4, 4);
insert into sample_table values ('X', trunc (sysdate), 5, 5);
insert into sample_table values ('X', trunc (sysdate), 6, 6);
insert into sample_table values ('X', trunc (sysdate), 7, 7);
insert into sample_table values ('X', trunc (sysdate), 8, null);
insert into sample_table values ('X', trunc (sysdate), 9, null);
insert into sample_table values ('X', trunc (sysdate), 10, null);
insert into sample_table values ('X', trunc (sysdate), 11, null);
insert into sample_table values ('X', trunc (sysdate), 12, null);
insert into sample_table values ('X', trunc (sysdate), 13, null);
insert into sample_table values ('X', trunc (sysdate), 14, null);
insert into sample_table values ('X', trunc (sysdate), 15, null);
Select t.*,
AVG (col_x) on myavg (partition col_a, col_b, col_c lines between 5 preceding and 1 preceding arrested)
of sample_table t
order by 1,2,3;
COL_A, COL_B, COL_C MYAVG COL_X
---------- ----------- ----- ------- ----------
X 15/01/2015 1 1.00
X 15/01/2015 2 2.00 1
X 15/01/2015 3 3.00 1.5
X 15/01/2015 4 4,00 2
X 15/01/2015 5 5.00 2.5
X 15/01/2015 6 6.00 3
X 15/01/2015 7 7.00 4
X 15/01/2015 8 5
X 15/01/2015 9 5.5
15/01/2015 X 10 6
X 15/01/2015 11 6.5
X 15/01/2015 12 7
15/01/2015 X 13
15/01/2015 X 14
X 15/01/2015 15
15 selected lines
What I really want is:
COL_A, COL_B, COL_C MYAVG COL_X
---------- ----------- ----- ------- ----------
X 15/01/2015 1 1.00
X 15/01/2015 2 2.00 1
X 15/01/2015 3 3.00 1.5
X 15/01/2015 4 4,00 2
X 15/01/2015 5 5.00 2.5
X 15/01/2015 6 6.00 3
X 15/01/2015 7 7.00 4
X 15/01/2015 8 4
X 15/01/2015 9 4
X 15/01/2015 10 4
X 15/01/2015 11 4
X 15/01/2015 12 4
X 15/01/2015 13 4
X 15/01/2015 14 4
X 15/01/2015 15 4
15 selected lines
concerning
Neil
Hello
Here's one way:
WITH got_avg AS
(
SELECT T.*
AVG (col_x) OVER (PARTITION BY col_a, NVL2 (col_x, 1, 0)
ORDER BY col_b, col_c
LINES BETWEEN 5 PRECEDING
AND 1 PRECEDING
) AS myavg
OF sample_table t
)
SELECT col_a, col_b, col_c, col_x
LAST_VALUE (myavg IGNORE NULLS) over (PARTITION BY col_a
ORDER BY col_b, col_c
) AS myavg
OF got_avg
ORDER BY col_a, col_b, col_c
;
Too bad, that we cannot use the IGNORE NULLS with AVG function.
-
Web Apps - I would like to display the last 3 items in a classification
Web Apps - I would like to display the last 3 items in a classification using named parameters. This link does not help enough that I can't with any instructions. - http://docs.businesscatalyst.com/dev-assets/reference#! / module-reference/web-apps/module_w ebapps.html
You wonder if it is what can be solved using liquid.
In the loop in the collection limit: 3
-
Hi, back back can check files you opened with "recent files"? With my current setup, I can only see the last 10 files. Can I change the setting to display the last 20 files for example? Thank you
File management preferences is where you can change the number. I don't know the maximum.
-
Help please! I using Muse (the free trial version) very well since last week, but the last few times I tried to use it, it comes back with ' TypeError: Error #1009 pouvez anyonve tried to use it, it comes back with ' error can someone help me figure out what the problem... I have a few days I really help neee what the problem is... I have a deadline in a few days so I really need! Thank you
Restart your Mac. The OSX Drag Manager got in a bad state. The only way to reset it is to restart your computer.
-
The product I bought doesn't work! I need help and I was stuck in your 'contact us loop' for the last few days and I'm frustrated. How can I contact you for help!
Probably the best place to start is the right forum for your product. This is the forum for Distiller Server, a product used by corporations long dead, and probably not what you have. If you can't find the right forum, please let us know the FULL name of what you paid for (Please check your invoice, as Adobe have a lot of similar products), and we may be able to direct you. Good luck!
-
Display the last 10 entries in database...
Hi, I would like to display the last 10 entries in my database, I use PHP and mySQL and Dreamweaver...
the latest entries are defined by the 10 highest ID numbers in the database, but there may be gaps in the numbers if an entry has been deleted.
What the WHERE the statement would look like to my request
SELECT *.
OF databasetable
WHERE ID = the largest number less than 10?
ORDER BY ID ASCAny ideas greatly appreciated!
Best regards, Ken
The correct way to proceed in MySQL is like this:
SELECT * FROM databasetable ORDER BY ID DESC LIMIT 10
It retrieves the results in reverse order.
If you want to order the results in ascending order AND use MySQL 4.1 or higher, you can do this:
SELECT * from databasetable WHERE ID > (SELECT ID FROM databasetable ORDER BY ID DESC LIMIT 10, 1) ORDER BY ID ASC
-
form table - displays the number of lines using LOV static
Hello
I have a report in table form, in that I want to display the number of lines.
For this I created a static LOVfor no lines and transmitted a list of values say 10; 25.50; 10,25 and 50... 1000; 1000
but my question is that how can I display all the lines in the tabular presentation using the static lov (as having one of the values in LOV like ALL for the number of lines to display).
can someone help me with this.1000; 1000... ALL; 9999999999
-
Hi all
I use the new version of the developer 4.0.1.14 on Windows 7 x 64, I noticed that the result of the query or the output of the script does not display as before:
When I run a query lets say with 100 lines of output, run the query successfully, but the cursor jumps automatically to the last record in the game as in all previous versions, I have to scroll manually everytime.
Can I change this?
Thank you
No, unfortunately, it's a bug.
It is not for all queries however. Still boring.
-
BI Publisher - how to display the number of lines displayed at the bottom of the table on each page
Hello
We are the conversion reports Actuate BEEP and not able to understand how to view "Accum.Total = < n >" at the bottom of each page. In the attached report to operate it, "Accum.Total = < n >" must be displayed at the bottom of each page where < n > is the number of lines displayed on the current page and previous page.
For example, if there are 10 rows in the result set, if the 1st page displays 4 rows, 2nd page displays 3 rows and 3rd page is 3 lines and then Accum.Total = 4 on page 1, Accum.Total = 7 on page 2 and Accum.Total = 10 on page 3.
Note that we use the property table "allow the lines to break Pages = False" as we do not want a specific line can be split across pages.
I enclose a sample of report actuate, rtf, BEEP and XML report for testing file.
Approach used so far-
1 > I tried to put the counter in the footer, but it seems that only the fields that come directly from the IC can be used on the header/footer. No matter what form text field or variables defined in the report.
2 > I used approach given in the link below. Using this approach, I am able to view a coded value hard at the bottom of every page (just below the table) but his does not work for the variable (in my case the counter c1).
https://blogs.oracle.com/xmlpublisher/entry/continued
3 > on Google, I found a few articles on the page break conditionally as display only certain numbers on a page or the page by section break but in our case, its dynamics and its number of lines to display on a page is driven by data, so I could not think of a certain condition to use in "Condition." ": If" for use as a page break.
Thank youRicha
Watch see the-Report
http://docs.Oracle.com/CD/E28280_01/bi.1111/e22254/create_rtf_tmpl.htm#do_bf_cf
Download the https://blogs.oracle.com/xmlpublisher/entry/continued sample
Add
<>
name = "contd_footer".
format = "99G999G999" / >
After the field "Footer."
If need to use a footer to display the meter then and sous-modèle with code above and call it in footer
Maybe you are looking for
-
So, I made a video for my in-laws some time ago, named "Dryland Organics, 2016" (just of images with a soundtrack of Bumblebee) and to test how it would look, I Mirroringand the generated m4v file in my ATV4, which, for some, reason to put an overlay
-
Would like to know the next update for my 10.5.8 probook 2009 version. 2.8 GHz 4 GB memory?
-
NETGEAR D7000 - Mode Access Point - connection problems with iOS Devices
Hello Having a problem with my Netgear D7000 in mode access point. My laptop (MacBook Pro) can successfully connect to WiFi and my PC connects fine cable using the D7000 as a switch. iOS devices, however, hurt that is to get or maintain a connection
-
Operating system: Windows XP Hardware: PCI 6259 Terminals used: PFI0 and PFI2 Counters used: Ctr0 and Ctr1 IM developing an application for the acquisition of data where timed loop synchronization source comes from my PFI2 (using the string A of an e
-
I need to download windows 7 home edition 64-bit I find here a place to do this but when I get to where you select your language, the only one he is Korean... so how do I use it? This is the site I'm going... I don't have a disc... but I have my prod