selecting a field value, which is the most recent CREATE_DATE
I have two fields in the table CREATE_DATE (Date) and QUEBEC (varchar). How the value of the field for record with the most recent CREATE_DATE? So, if the table contains the following recordsAS CREATE_DATE
ABCD ON 20/12/2008
2008-12-21 DEFH
2009-01-10 ALINE
I want to request to return ALINE. I now have a query "select table where rownum = 1 order by desc CREATE_DATE. Is there a better way to do it?
Thank you
Ravi
Select from the table where CREATE_DATE = (SELECT MAX (CREATE_DATE) FROM table)
Tags: Database
Similar Questions
-
How to get the values based on the most recent date
Oracle Version 8i
How to get the new_value based on the most recent date
SELECT max (MODIFIED_ON), the Group LOG_ITEM_CHARACTERISTICS by MODIFIED_ON new_value - does not
Please, someone help me
CREATE TABLE LOG_ITEM_CHARACTERISTICS ( CHAR_LOG_ID NUMBER(10) NOT NULL, PIRM_ID VARCHAR2(8) NOT NULL, CONSTANT_FLAG VARCHAR2(1), CHARACTERISTIC_NAME VARCHAR2(25) NOT NULL, TYPE_NAME VARCHAR2(10) NOT NULL, NEW_VALUE VARCHAR2(3000), UOM VARCHAR2(10), MODIFIED_BY VARCHAR2(30), MODIFIED_ON DATE ) SET DEFINE OFF; Insert into LOG_ITEM_CHARACTERISTICS (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, UOM, MODIFIED_BY, MODIFIED_ON) Values (187376, '0307490N', 'N', 'OUTPUT CURRENT', 'PS2030/WVL', '1', 'AMPS', 'EMPXD88', TO_DATE('10/25/1999 00:00:00', 'MM/DD/YYYY HH24:MI:SS')); Insert into LOG_ITEM_CHARACTERISTICS (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, UOM, MODIFIED_BY, MODIFIED_ON) Values (187377, '0307490N', 'N', 'OUTPUT VOLTAGE', 'PS2030/WVL', '54.9', 'VOLTS', 'EMPXD88', TO_DATE('09/22/1998 00:00:00', 'MM/DD/YYYY HH24:MI:SS')); Insert into LOG_ITEM_CHARACTERISTICS (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, UOM, MODIFIED_BY, MODIFIED_ON) Values (187378, '0307490N', 'N', 'OUTPUT CURRENT', 'PS2030/WVL', '0', 'AMPS', 'EMDXB88', TO_DATE('09/22/1998 00:00:00', 'MM/DD/YYYY HH24:MI:SS')); Insert into LOG_ITEM_CHARACTERISTICS (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, UOM, MODIFIED_BY, MODIFIED_ON) Values (187384, '0307490N', 'N', 'OUTPUT CURRENT', 'PS2030/WVL', '2', 'AMPS', 'EMAXC29', TO_DATE('11/10/2000 00:00:00', 'MM/DD/YYYY HH24:MI:SS')); Insert into LOG_ITEM_CHARACTERISTICS (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, UOM, MODIFIED_BY, MODIFIED_ON) Values (187385, '0307490N', 'N', 'OUTPUT VOLTAGE', 'PS2030/WVL', '55.1', 'VOLTS', 'EMAXC29', TO_DATE('10/19/2001 00:00:00', 'MM/DD/YYYY HH24:MI:SS')); Insert into LOG_ITEM_CHARACTERISTICS (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, UOM, MODIFIED_ON) Values (2400742, '0307490N', 'N', 'MEASURED LOAD ON PER', 'PS2030/WVL', '2', 'AMPS', TO_DATE('10/19/2001 00:00:00', 'MM/DD/YYYY HH24:MI:SS')); Insert into LOG_ITEM_CHARACTERISTICS (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, UOM, MODIFIED_BY, MODIFIED_ON) Values (574093, '0307490N', 'N', 'MEASURED LOAD ON PER', 'PS2030/WVL', '2', 'AMPS', 'EMCTH88', TO_DATE('12/13/2002 11:55:16', 'MM/DD/YYYY HH24:MI:SS')); Insert into LOG_ITEM_CHARACTERISTICS (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, UOM, MODIFIED_BY, MODIFIED_ON) Values (574094, '0307490N', 'N', 'OUTPUT VOLTAGE', 'PS2030/WVL', '54.9', 'VOLTS', 'EMCTH88', TO_DATE('12/13/2002 11:55:16', 'MM/DD/YYYY HH24:MI:SS')); Insert into LOG_ITEM_CHARACTERISTICS (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, UOM, MODIFIED_BY, MODIFIED_ON) Values (3131486, '0307490N', 'N', 'MEASURED LOAD ON PER', 'PS2030/WVL', '6', 'AMPS', 'EMCTH88', TO_DATE('12/16/2004 14:31:14', 'MM/DD/YYYY HH24:MI:SS')); Insert into LOG_ITEM_CHARACTERISTICS (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, UOM, MODIFIED_BY, MODIFIED_ON) Values (3131487, '0307490N', 'N', 'LAST MEASURED DATE', 'PS2030/WVL', '16-12-04', 'DD/MM/YY', 'EMCTH88', TO_DATE('12/16/2004 14:31:14', 'MM/DD/YYYY HH24:MI:SS')); Insert into LOG_ITEM_CHARACTERISTICS (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, MODIFIED_BY, MODIFIED_ON) Values (3131488, '0307490N', 'Y', 'POWER SUPPLY', 'PS2030/WVL', 'ESSENTIAL', 'EMCTH88', TO_DATE('12/16/2004 14:31:14', 'MM/DD/YYYY HH24:MI:SS')); Insert into LOG_ITEM_CHARACTERISTICS (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, UOM, MODIFIED_BY, MODIFIED_ON) Values (3131489, '0307490N', 'N', 'OUTPUT VOLTAGE', 'PS2030/WVL', '54.9', 'VOLTS', 'EMCTH88', TO_DATE('12/16/2004 14:31:14', 'MM/DD/YYYY HH24:MI:SS')); Insert into LOG_ITEM_CHARACTERISTICS (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, UOM, MODIFIED_BY, MODIFIED_ON) Values (4759086, '0307490N', 'N', 'MEASURED LOAD ON PER', 'PS2030/WVL', '6', 'AMPS', 'EMRCT88', TO_DATE('11/15/2007 14:33:03', 'MM/DD/YYYY HH24:MI:SS')); Insert into LOG_ITEM_CHARACTERISTICS (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, UOM, MODIFIED_BY, MODIFIED_ON) Values (4759087, '0307490N', 'N', 'OUTPUT VOLTAGE', 'PS2030/WVL', '54.9', 'VOLTS', 'EMRCT88', TO_DATE('11/15/2007 14:33:03', 'MM/DD/YYYY HH24:MI:SS')); Insert into LOG_ITEM_CHARACTERISTICS (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, UOM, MODIFIED_BY, MODIFIED_ON) Values (4759088, '0307490N', 'N', 'LAST MEASURED DATE', 'PS2030/WVL', '14/11/07', 'DD/MM/YY', 'EMRCT88', TO_DATE('11/15/2007 14:33:03', 'MM/DD/YYYY HH24:MI:SS')); Insert into LOG_ITEM_CHARACTERISTICS (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, UOM, MODIFIED_BY, MODIFIED_ON) Values (6646012, '0307490N', 'N', 'MEASURED LOAD ON PER', 'PS2030/WVL', '5', 'AMPS', 'PAUL DEVERILL', TO_DATE('01/06/2011 12:56:17', 'MM/DD/YYYY HH24:MI:SS')); Insert into LOG_ITEM_CHARACTERISTICS (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, MODIFIED_BY, MODIFIED_ON) Values (6646013, '0307490N', 'Y', 'BATT TEST SET AT 3M', 'PS2030/WVL', 'null', 'PAUL DEVERILL', TO_DATE('01/06/2011 12:56:17', 'MM/DD/YYYY HH24:MI:SS')); Insert into LOG_ITEM_CHARACTERISTICS (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, MODIFIED_BY, MODIFIED_ON) Values (6646014, '0307490N', 'Y', 'CAP ALARM INHIBITED', 'PS2030/WVL', 'null', 'PAUL DEVERILL', TO_DATE('01/06/2011 12:56:17', 'MM/DD/YYYY HH24:MI:SS')); Insert into LOG_ITEM_CHARACTERISTICS (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, UOM, MODIFIED_BY, MODIFIED_ON) Values (6646015, '0307490N', 'N', 'OUTPUT VOLTAGE', 'PS2030/WVL', '55', 'VOLTS', 'PAUL DEVERILL', TO_DATE('01/06/2011 12:56:17', 'MM/DD/YYYY HH24:MI:SS')); Insert into LOG_ITEM_CHARACTERISTICS (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, MODIFIED_BY, MODIFIED_ON) Values (6646016, '0307490N', 'Y', 'YR ROUTINES REQUIRED', 'PS2030/WVL', 'null', 'PAUL DEVERILL', TO_DATE('01/06/2011 12:56:17', 'MM/DD/YYYY HH24:MI:SS')); Insert into LOG_ITEM_CHARACTERISTICS (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, MODIFIED_BY, MODIFIED_ON) Values (6646057, '0307490N', 'Y', 'BATT TEST SET AT 3M', 'PS2030/WVL', 'null', 'PAUL DEVERILL', TO_DATE('01/06/2011 13:03:18', 'MM/DD/YYYY HH24:MI:SS')); Insert into LOG_ITEM_CHARACTERISTICS (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, MODIFIED_BY, MODIFIED_ON) Values (6646058, '0307490N', 'Y', 'CAP ALARM INHIBITED', 'PS2030/WVL', 'null', 'PAUL DEVERILL', TO_DATE('01/06/2011 13:03:18', 'MM/DD/YYYY HH24:MI:SS')); Insert into LOG_ITEM_CHARACTERISTICS (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, MODIFIED_BY, MODIFIED_ON) Values (6646059, '0307490N', 'Y', 'YR ROUTINES REQUIRED', 'PS2030/WVL', 'null', 'PAUL DEVERILL', TO_DATE('01/06/2011 13:03:18', 'MM/DD/YYYY HH24:MI:SS')); Insert into LOG_ITEM_CHARACTERISTICS (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, UOM, MODIFIED_BY, MODIFIED_ON) Values (6648577, '0307490N', 'N', 'MEASURED LOAD ON PER', 'PS2030/WVL', '6', 'AMPS', 'EMPXD88', TO_DATE('01/07/2011 13:35:45', 'MM/DD/YYYY HH24:MI:SS')); Insert into LOG_ITEM_CHARACTERISTICS (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, UOM, MODIFIED_BY, MODIFIED_ON) Values (6648578, '0307490N', 'N', 'OUTPUT VOLTAGE', 'PS2030/WVL', '55', 'VOLTS', 'EMPXD88', TO_DATE('01/07/2011 13:35:45', 'MM/DD/YYYY HH24:MI:SS')); Insert into LOG_ITEM_CHARACTERISTICS (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, MODIFIED_BY, MODIFIED_ON) Values (6648579, '0307490N', 'Y', 'YR ROUTINES REQUIRED', 'PS2030/WVL', 'NULL', 'EMPXD88', TO_DATE('01/07/2011 13:35:45', 'MM/DD/YYYY HH24:MI:SS')); Insert into LOG_ITEM_CHARACTERISTICS (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, MODIFIED_BY, MODIFIED_ON) Values (6648580, '0307490N', 'Y', 'BATT TEST SET AT 3M', 'PS2030/WVL', 'NULL', 'EMPXD88', TO_DATE('01/07/2011 13:36:00', 'MM/DD/YYYY HH24:MI:SS')); Insert into LOG_ITEM_CHARACTERISTICS (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, MODIFIED_BY, MODIFIED_ON) Values (6648581, '0307490N', 'Y', 'CAP ALARM INHIBITED', 'PS2030/WVL', 'NULL', 'EMPXD88', TO_DATE('01/07/2011 13:36:10', 'MM/DD/YYYY HH24:MI:SS')); Insert into LOG_ITEM_CHARACTERISTICS (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, UOM, MODIFIED_BY, MODIFIED_ON) Values (6648634, '0307490N', 'N', 'MEASURED LOAD ON PER', 'PS2030/WVL', '5', 'AMPS', 'EMPXD88', TO_DATE('01/07/2011 13:51:06', 'MM/DD/YYYY HH24:MI:SS')); Insert into LOG_ITEM_CHARACTERISTICS (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, UOM, MODIFIED_BY, MODIFIED_ON) Values (6648635, '0307490N', 'N', 'OUTPUT VOLTAGE', 'PS2030/WVL', '55', 'VOLTS', 'EMPXD88', TO_DATE('01/07/2011 13:51:06', 'MM/DD/YYYY HH24:MI:SS')); COMMIT;
user4587979 wrote:
Hi FrankYes, but I had more than 2 tables with item_characteristics, type_characteristics
If there are other tables involved, then CREATE TABLE and INSERT statements for them (for the relevant columns only). You must not post a lot of examples of data; usually just a couple of lines per table is enough to show the problem.
Also post the results desired from these data.What I try to do is, I'm comparing new_value in log_item_characteristics (whichever is most recent) with CHR_VALUE in the item_characteristics and the needs of different output values
I am trying to query is not giving desired out put
Point out some places where the output is wrong and explain how you get good results in these places, using specific examples from the data sample.
select lic.PIRM_ID, ic.CHR_ID, lic.CHARACTERISTIC_NAME, lic.TYPE_NAME, ic.CHR_VALUE, lic.NEW_VALUE, lic.MODIFIED_BY, lic.MODIFIED_ON, ic.CREATED_BY, ic.CREATED_ON,ic.MODIFIED_BY, ic.MODIFIED_ON from log_item_characteristics lic, item_characteristics ic,type_characteristics tc where lic.TYPE_NAME=tc.TYPE_NAME and lic.CHARACTERISTIC_NAME=tc.CHR_NAME and lic.PIRM_ID=ic.PIRM_ID and tc.CHR_ID=ic.CHR_ID and ic.CHR_VALUE <> lic.NEW_VALUE and lic.pirm_id in ('0307490N','0307521C') order by lic.pirm_id
Thank you; It is useful to see the existing query. Really, you have to format your code.
Please can you help me
What you've posted so far is like saying "I'm going 200 meters to the North, and then 500 meters East, but I'm not getting where I want to go." I would have a better chance to help you if you said, 'I'm out of my house, at 100, Elm Street and try to get to the supermarket at Broadway 279. I'm going 200 meters to the North... ', or, even better. "I want to buy a newspaper and some orange juice, so I thought I'd go to a convenience store. I start at my house, at 100, Elm Street... »
Always post some examples of data (CREATE TABLE and INSERT statements, as you did in your first post) and the desired results from these data. Explain how you get these results from these data. -
I have a need to query the most recent entry in a value in a field became the current value, but it is possible that it was this value before, so a simple MIN() is insufficient.
Example, I want to date the EMPLID reported to the current REPORTS_TO
EMPLID REPORTS_TO EFFDT OTHER_DATA Comment 123456 500500 01/12/2010 xxx 123456 500500 15/12/2010 XYY 123456 500999 30/01/2013 XYZ 123456 500999 30/06/2014 zzz 123456 500500 15/01/2015 ABC GET THIS EFFDT 123456 500500 01/12/2015 nnn Most of the time a MIN() would work, but there are cases like this that throw me a curve known.
Any advice is most appreciated. Thank you!
WITH emp_report_tab AS
(SELECT emplid 123456, 500500 reports_to, DATE ' 2010-12-01' effdate FROM dual)
UNION ALL
SELECT emplid 123456, 500500 reports_to, DATE ' 2010-12-15' effdate FROM dual
UNION ALL
SELECT emplid 123456, 500999 reports_to, DATE ' 2013-01-30' effdate FROM dual
UNION ALL
SELECT emplid 123456, 500999 reports_to, DATE ' 2014-06-30' effdate FROM dual
UNION ALL
SELECT emplid 123456, 500500 reports_to, DATE ' 2015-01-15' effdate FROM dual
UNION ALL
EmplID SELECT 123456, 500500 reports_to, DATE ' 2015-12-01' effdate FROM dual)
SELECT er0.emplid, MIN (er0.effdate)
Of emp_report_tab er0
WHERE er0.effdate >
(SELECT MAX (er1.effdate)
of emp_report_tab er1
where er1.emplid = er0.emplid
and er1.reports_to! =
(By SELECTING er2.reports_to in emp_report_tab er2
WHERE er2.emplid = er1.emplid
AND er2.effdate =
(select max (effdate) in emp_report_tab er3
where er3.emplid = er2.emplid
and er3.effdate<=>=>
GROUP BY er0.emplid;
EMPLID MIN (ER0. E
---------- ---------
123456 15 JANUARY 2015
-
I did the most recent iOS 10 updated, just heard on the news that Yahoo has been hacked. I changed my password to Yahoo mail but can't find the field to change the password on my devices. It is simply not there, what is happening?
For some reason any change automatically if change you it online. Today, I changed my password through my office and I went to change the mail and she had already changed.
You can try to delete your account your unit off and add it again.
-
Select / display of the most recent image.
Hi, I use Bridge to see the photos I take captive.
Is there a way to keep the most recent selected image so that I can see the most recent shot?
OK I got it to work, but only with Bridge CS5 , he dislikes cs6 or cc.
The code is here:- http://expirebox.com/download/abc4e20ea65c95853809a500fe92f105.html
ExpireBox | BridgePreviewLatestFile.zip
I used the film mode, and once a new file is droped in the folder displayed in the bridge.
Bridge CS5 is always the best!
-
Select the most recent DATE for identification.
Hi all
I need to SELECT records with the most recent DATE for each code. A DATE range is part of the selection criteria.
My data.
MY_ID MY_DATE
1684662 26 JANUARY 09
1424097 27 JANUARY 09
1684663 27 JANUARY 09
1684664 27 JANUARY 09
1684672 28 JANUARY 09
0689073 28 JANUARY 09
1052476 21 JANUARY 09
1052476 21 JANUARY 09
1360828 23 JANUARY 09
1684661 23 JANUARY 09
1052476 30 JANUARY 09
1052476 30 JANUARY 09
1052476 30 JANUARY 09
1052476 30 JANUARY 09
The code below works fine when you select 1 ID in the subselect, but with several ID he always selects rownum = 1 (of course). As far my mind takes me.
SELECT my_id,
my_date
Of
(SELECT my_id,
my_date
FROM my_table
ORDER BY DESC my_date
)
WHERE rownum = 1
AND * {color: #ff0000} my_id = 1052476 {color} *.
AND TO_CHAR(my_date,'YYYY/MM/DD') BETWEEN ' 01 / 01/2009 ' AND '' 2009/01/31;
If I could somehow pass the ID SELECT in the subselect WHERE clause I should have done this.
Any suggestions?
Thanks in advance for your help,
LouOne of the many soultions possible.
ME_XE?with data as 2 ( 3 select 1684662 as id, to_date('26-JAN-09','dd-mon-yyyy') as the_date from dual union all 4 select 1424097 as id, to_date('27-JAN-09','dd-mon-yyyy') as the_date from dual union all 5 select 1684663 as id, to_date('27-JAN-09','dd-mon-yyyy') as the_date from dual union all 6 select 1684664 as id, to_date('27-JAN-09','dd-mon-yyyy') as the_date from dual union all 7 select 1684672 as id, to_date('28-JAN-09','dd-mon-yyyy') as the_date from dual union all 8 select 0689073 as id, to_date('28-JAN-09','dd-mon-yyyy') as the_date from dual union all 9 select 1052476 as id, to_date('21-JAN-09','dd-mon-yyyy') as the_date from dual union all 10 select 1052476 as id, to_date('21-JAN-09','dd-mon-yyyy') as the_date from dual union all 11 select 1360828 as id, to_date('23-JAN-09','dd-mon-yyyy') as the_date from dual union all 12 select 1684661 as id, to_date('23-JAN-09','dd-mon-yyyy') as the_date from dual union all 13 select 1052476 as id, to_date('30-JAN-09','dd-mon-yyyy') as the_date from dual union all 14 select 1052476 as id, to_date('30-JAN-09','dd-mon-yyyy') as the_date from dual union all 15 select 1052476 as id, to_date('30-JAN-09','dd-mon-yyyy') as the_date from dual union all 16 select 1052476 as id, to_date('30-JAN-09','dd-mon-yyyy') as the_date from dual 17 ) 18 select id, the_date 19 from 20 ( 21 select id, the_date, max(the_date) over (partition by id) as max_the_date 22 from data 23 ) 24 where the_date = max_the_date; ID THE_DATE ------------------ -------------------------- 689073 28-JAN-0009 12 00:00 1052476 30-JAN-0009 12 00:00 1052476 30-JAN-0009 12 00:00 1052476 30-JAN-0009 12 00:00 1052476 30-JAN-0009 12 00:00 1360828 23-JAN-0009 12 00:00 1424097 27-JAN-0009 12 00:00 1684661 23-JAN-0009 12 00:00 1684662 26-JAN-0009 12 00:00 1684663 27-JAN-0009 12 00:00 1684664 27-JAN-0009 12 00:00 ID THE_DATE ------------------ -------------------------- 1684672 28-JAN-0009 12 00:00 12 rows selected. Elapsed: 00:00:00.03
-
I have the following MAC PRO:
Model name: MacBook Pro
Model identifier: MacBookPro8, 1
Processor name: Intel Core i5
Memory: 4 GB
Boot ROM version: MBP81.0047.B27
Version of the SCM (System): 1.68f99
Serial number (System): C02G4Z0TDH2G
Material UUID: D58D2195-F16E-5570-AB72-A71613DC1C29
If I download OS 10.11.3, how can I open my word/excel files if MS word excel cannot be used with it?
You can use Microsoft Office 2008, 2011, and 2016, Pages and numbers, LibreOffice or similar software (not including previous versions of Microsoft Office.) The most recent operating system that supports Microsoft Office 2004 is 10.6.8.
(139184)
-
Hello
Hope someone here might be able to help. Running Windows Vista Ultimate Pro OS but realize I have to make the trip up to 7 or 8.1. Can someone tell me how to do this (i.e. should I get Windows 7, then update to 8.1, or can simply go directly from Vista to 8.1)? I'm hoping to minimize the costs that we are on a bit of a fixed income here. Can I use upgrades or what I must have full OS to move?
On the front of MS Office, currently sports Office 2007, but desperately need to move until the most recent is and again, this can be done cheaply? I mean can I pay at a discounted price on eBay or Amazon or I have to go directly to the shop of MS to ensure an authentic copy (but * frown * full price)?
It's been rough, the last 4 years, but I think that things are finally looking a bit and wanted to get new systems / software in place while I still had the chance. Don't want to be caught in the position where Microsoft continues the upgrade / support versions that I run, it's a kind of scary place, unless it is on an old / computer test, but not my direct computer to use computers all day.
Any assistance with this will be appreciated. Thank you all and have a great day!
Hello
Nothing can 'do with it' If you want legal software.
What, whether it's "buyer beware".
It's your choice where you buy your software since.
With Windows 7 Microsoft no longer sells, so you use Amazon, etc.
There is no way to upgrade Vista to 8.1
Before purchasing Windows 7, follow these steps:
Go to your computer / computer laptop manufacturer Web site and see if Windows 7 drivers are available for your make and model computer / laptop.
If this is not available, Windows 7 will not properly work for you.
Run the "Windows 7 Upgrade Advisor.
http://www.Microsoft.com/en-US/Download/details.aspx?ID=20
Check if your specifications are compatible for Windows 7:
"Windows 7 system requirements"
http://Windows.Microsoft.com/en-us/Windows7/products/system-requirements
"Windows 7 Compatibility Center" for software and hardware:
http://www.Microsoft.com/Windows/compatibility/Windows-7/en-us/default.aspx
Windows 7 upgrade paths:
http://TechNet.Microsoft.com/en-us/library/dd772579 (v = ws.10) .aspx
«Installation and reinstallation of Windows 7»
http://Windows.Microsoft.com/en-us/Windows7/installing-and-reinstalling-Windows-7
___________________________
Do the following before upgrade you to Windows 8.1.
Check if the manufacturer of your computer/laptop has Windows 8 drivers available for your model.
If this is not available, Windows 8/8.1 not install and work properly for you.
There is a lot of information in this first link from Microsoft:
Download and run the Windows Upgrade Assistant 8.1 of to see if your machine is compatible Windows 8.1 and read the update for Windows 8.1: FAQ here
:
http://Windows.Microsoft.com/en-us/Windows-8/upgrade-to-Windows-8
"8.1 for Windows system requirements.
http://Windows.Microsoft.com/en-us/Windows-8/system-requirements
@@@@@@@@@@@@@@@@@@@@@@
Ago free Office Suites: OpenOffice and free.
If you want to use Microsoft Office, you need to decide on an operating system first to check if the suites given office are compatible with them.
See you soon.
-
How to turn off the most recent list used to term & other apps
were if you search the registry problem disable MRU in all applications, especially the run command on the start menu, but I would like to eliminate all the other apps as well
I found several solutions including one that mentions comdlg32, others who need to add fields to the register, any other fair value dword
Is there a single solution or do I need a combination of solutions
I didn't do this, but here I found at least 5 versions, one of which is correct & universal
:
1. [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Comdlg32]
"NoFileMru" = DWORD: 000000012.HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
Value name: NoRecentDocsMenu
Value type: REG_DWORD
Value data: 0 or 1
0 = Yes, allow these recent docs
1 = no, do not allow any recent docsValue name: ClearRecentDocsOnExit
Value type: REG_DWORD
Value data: 0 or 1
0 = no does not clear
1 = Yes, clearly theirValue name: NoRecentDocsHistory
Value type: REG_DWORD
Value data: 0 or 1
0 = historic Yes
1 = no history3 turn off the history:
Click Start--> Run--> type "regedit" in the Run dialog box.
When in the registry, locate the following key:
HKEY_CURRENT_USER > Software > Microsoft > Windows > CurrentVersion > Explorer > RunMRU.
Right click on the RunMRU key and choose "Permissions."... ».
Click on "Add..." ».
Type "Everyone" and click OK in the box that opens.
In the permissions (security) dialog box, select all and then deny read access.
Click OK.
Close the registry editor. You may need to restart your computer for the changes to take effect' 4 ' most recently used ' list - how to disable file
PreviousThe information in this article applies to:
WinWay RESUME 9.0 and versions later
Summary
Like many other Windows applications, the menu 'File' of WinWay RESUME luxury offers easy access to read files recently. This article explains how to remove this list.
More informationWindows offers a system policy to disable the file 'most recently used' lists for applications in accordance with this particular policy standard.
To turn off the "most recently used" list of files, download and run this file.
To restore the list, download and run this file.Notes:
This setting affects several applications, not only WinWay RESUME
This setting applies only to the user currently logged on to the computer. You can repeat these steps for the other connections if necessaryFor advanced users
The parameters above can be entered through the Publisher of the registry as well.
Select Start, run, Reg Edit
Navigate to this registry key:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
To disable the "recently used file list", adds the value:Name: NoRecentDocsHistory
Type: DWORD
Value: 1To activate the "recently used file list", right-click on the 'NoRecentDocsHistory' and select 'delete '.
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion \Policies\Comdlg32 key. 2. create a REG_DWORD value called NoFileMru and set the value to 1.
5.
Type regedit in the box RUN, and then press ENTER. It will open the registry editor.2. now go to following keys successively:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer
HKEY_USERS\.default\Software\Microsoft\Windows\CurrentVersion\Policies\ExplorerIn the right pane, look for a DWORD 'ClearRecentDocsOnExit '. Its value could be set to 1. Set its value to 0 or delete it completely.
The recent documents menu can be disabled easily by editing the registry. To do this, go to the following key:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
Now in the right pane, create a new DWORD with the name: NoRecentDocsMenu and set its value to 1. Restart the browser to save the changes.
You can also clear the RUN MRU history. All ads are stored in the key:
HKEY_USERS\. Default\Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU
You can remove individual entries or the entire list. To remove history to find inscriptions date on:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Doc find Spec MRU and delete. -
Performance of the queries in order to get the most recent price
Happy new year everyone.
I have a table of price in my system that has several awards for each product with the date, the price is entered into force.
I have queries throughout the system to retrieve the most recent actual price for the date of the transaction.
I can find to implement the easiest way is to have a user-defined function to collect the prize.
My problem is that many of my questions have access to large amounts of data (for example, transactions) and my table of prices is also big enough - both have millions of records. Using a Pl/SQL function defined by the user in my query, I get a lot of switching context between SQL and PL/SQL and my questions are not well
Here is an example of code, which simplifies my scenario:
drop table xo_stock_trans; create table xo_stock_trans (item varchar2(25), trans_date date, quantity number(20,4)); insert into xo_stock_trans values('A',TO_DATE('25-DEC-2014','DD-MON-YYYY'), 4); insert into xo_stock_trans values('A',TO_DATE('27-DEC-2014','DD-MON-YYYY'), -2); insert into xo_stock_trans values('A',TO_DATE('28-DEC-2014','DD-MON-YYYY'), 5); insert into xo_stock_trans values('B',TO_DATE('23-DEC-2014','DD-MON-YYYY'), 20); insert into xo_stock_trans values('B',TO_DATE('26-DEC-2014','DD-MON-YYYY'), -6); insert into xo_stock_trans values('B',TO_DATE('29-DEC-2014','DD-MON-YYYY'), 15); / -- Generate lots more data BEGIN -- Generate more trans dates for r in 1..1000 LOOP insert into xo_stock_trans select item, trans_date - r - 7 as trans_date, ROUND(dbms_random.value(1,50),2) as quantity from xo_stock_trans where trans_date between TO_DATE('23-DEC-2014','DD-MON-YYYY') AND TO_DATE('29-DEC-2014','DD-MON-YYYY') and item in ('A','B'); END LOOP; COMMIT; -- generate more items for lt in 1..12 LOOP -- generate C,D, E, items INSERT into xo_stock_trans SELECT chr(ascii(item)+(lt*2)) as item, trans_date, quantity from xo_stock_trans where item in ('A','B'); -- generate A1, A2, B1, B2, etc for nm in 1..10 LOOP INSERT INTO xo_stock_trans select item || to_char(nm), trans_date, quantity from xo_stock_trans where length(item) = 1; END LOOP; COMMIT; END LOOP; COMMIT; END; / create index xo_stock_trans_ix1 on xo_stock_trans (item); create index xo_stock_trans_ix2 on xo_stock_trans (trans_date); exec dbms_stats.gather_table_stats(ownname =>user, tabname => 'XO_STOCK_TRANS' , estimate_percent => 100, degree => dbms_stats.auto_degree, cascade=>true); / drop table xo_prices; create table xo_prices (item varchar2(25), price_date date, gross_price number(20,4), net_price number(20,4), special_price number(20,4) ); insert into xo_prices values ('A', to_date('01-DEC-2014','DD-MON-YYYY'), 10, 8, 6); insert into xo_prices values ('A', to_date('25-DEC-2014','DD-MON-YYYY'), 9, 8, 6); insert into xo_prices values ('A', to_date('26-DEC-2014','DD-MON-YYYY'), 7, 6, 4); insert into xo_prices values ('B', to_date('01-DEC-2014','DD-MON-YYYY'), 5.50, 4.50, 3); insert into xo_prices values ('B', to_date('25-DEC-2014','DD-MON-YYYY'), 5.00, 4.00, 3); insert into xo_prices values ('B', to_date('26-DEC-2014','DD-MON-YYYY'), 3.50, 2.50, 2); / -- Generate lots more data BEGIN -- Generate more price dates for r in 1..1000 LOOP insert into xo_prices select item, price_date - r - 7 as price_date,gross_price, net_price, special_price from xo_prices where price_date between TO_DATE('23-DEC-2014','DD-MON-YYYY') AND TO_DATE('29-DEC-2014','DD-MON-YYYY') and item in ('A','B'); END LOOP; COMMIT; -- generate more items for lt in 1..12 LOOP -- generate C,D, E, items INSERT into xo_prices SELECT chr(ascii(item)+(lt*2)) as item, price_date, gross_price + (lt*2), net_price + (lt*2), special_price + (lt*2) from xo_prices where item in ('A','B'); -- generate A1, A2, B1, B2, etc for nm in 1..10 LOOP INSERT INTO xo_prices select item || to_char(nm), price_date, gross_price, net_price, special_price from xo_prices where length(item) = 1; END LOOP; COMMIT; END LOOP; END; / create index xo_prices_ix1 on xo_prices (item, price_date); exec dbms_stats.gather_table_stats(ownname =>user, tabname => 'XO_PRICES' , estimate_percent => 100, degree => dbms_stats.auto_degree, cascade=>true); / create or replace function xo_get_price(I_Item in VARCHAR2, I_Date in DATE, i_Price_type IN VARCHAR2) RETURN NUMBER IS -- Function to get most recent effective price prior to the date CURSOR c_get_prices(P_Item VARCHAR2, P_Date VARCHAR2) IS SELECT gross_price, net_price, special_price FROM XO_PRICES WHERE item = P_Item AND price_date <= P_Date ORDER BY price_date desc; -- most recent price l_gross_price NUMBER(20,4); l_net_price NUMBER(20,4); l_special_price NUMBER(20,4); BEGIN OPEN c_get_prices(I_Item, I_Date); FETCH c_get_prices INTO l_gross_price, l_net_price, l_special_price; CLOSe c_get_prices; IF I_Price_Type='GROSS' then return l_gross_price; ELSIF I_Price_Type= 'NET' then return l_net_price; ELSIF I_Price_Type= 'SPECIAL' then return l_special_price; END IF; END xo_get_price; / -- Here is a typical query I am trying to perform select tr.item, tr.trans_date, tr.quantity , xo_get_price(tr.item, tr.trans_date, 'GROSS') as gross_price , xo_get_price(tr.item, tr.trans_date, 'NET') as net_price , xo_get_price(tr.item, tr.trans_date, 'SPECIAL') as special_price from xo_stock_trans tr where tr.trans_date between '01-AUG-2014' and '31-AUG-2014';
I would like to refactor my request so that I do not use the user Pl/SQL functions, but so far I can't get something that works better than the SQL above. For example, the following query is MUCH longer:
select tr.item, tr.trans_date, tr.quantity , pr.gross_price , pr.net_price , pr.special_price from xo_stock_trans tr join xo_prices pr on pr.item = tr.item and pr.price_date = (select max(pr2.price_date) from xo_prices pr2 where pr2.item = pr.item and pr2.price_date <= tr.trans_date ) where tr.trans_date between '01-AUG-2014' and '31-AUG-2014';
I'm interested to know if anyone has addressed a similar scenario and have managed to write more efficient code.
I looked at the determinism/manual caching of the function, but the article/date combinations are quite unique and therefore he does not benefit from him.
Any suggestion under review - parallelism, analytical, pipeline functions, etc.
Alan
Hi, Alan.
Alan Lawlor wrote:
...
My problem is that many of my questions have access to large amounts of data (for example, transactions) and my table of prices is also big enough - both have millions of records. Using a Pl/SQL function defined by the user in my query, I get a lot of switching context between SQL and PL/SQL and my questions are not well...
You got that right! User-defined functions can be very practical, but this practice comes with a price.
What version of Oracle are you using? The Oracle 12, there is a new feature of 'temporal validity' which may help you.
In any version, it will be much faster if you add a new column to the xo_prices table. You can call this end_date, although it would in fact be the date when some other prices took effect. You might put DATE' 9999-12-31 in the column end_date for current prices. You can calculate end_date using the analytical function of LEAD. Be sure to re-calcluate end_date when you insert new rows into xo_prices, or when you update the dates on existing lines.
Once you have PRICE_DATE and end_date in the XO_PRICES table, you can join this table to get the real price from d by including
AND d > = xo_prices.price_date
AND d< > >
in the join condition.
In some situations, especially when you don't have much different (item, dates) combinations, scalar-sub-queries could be faster than joins.
Whatever it is, it participates without PL/SQL, so there is no context switching.
-
How to find the most recent date prev?
Hello
Here is the sample table and sample data.
I have to read the table so that I got when I read a line of CODE = 1 for DT = 30 - OCT - 2012, I have to check what was the price for the CODE = 1 in the most recent previous date (which is October 28, 2013). Then I will compare the two prices (for 30 Oct 28th) and fill out another table.CREATE TABLE t1 (code NUMBER, dt DATE, price NUMBER) / Insert into T1 (CODE, DT, PRICE) Values (1, TO_DATE('10/21/2012', 'MM/DD/YYYY'), 10); Insert into T1 (CODE, DT, PRICE) Values (1, TO_DATE('10/22/2012', 'MM/DD/YYYY'), 10); Insert into T1 (CODE, DT, PRICE) Values (1, TO_DATE('10/23/2012', 'MM/DD/YYYY'), 12); Insert into T1 (CODE, DT, PRICE) Values (1, TO_DATE('10/24/2012', 'MM/DD/YYYY'), 9); Insert into T1 (CODE, DT, PRICE) Values (1, TO_DATE('10/25/2012', 'MM/DD/YYYY'), 8); Insert into T1 (CODE, DT, PRICE) Values (1, TO_DATE('10/26/2012', 'MM/DD/YYYY'), 13); Insert into T1 (CODE, DT, PRICE) Values (1, TO_DATE('10/27/2012', 'MM/DD/YYYY'), 11); Insert into T1 (CODE, DT, PRICE) Values (1, TO_DATE('10/28/2012', 'MM/DD/YYYY'), 15); Insert into T1 (CODE, DT, PRICE) Values (2, TO_DATE('10/29/2012', 'MM/DD/YYYY'), 15); Insert into T1 (CODE, DT, PRICE) Values (1, TO_DATE('10/30/2012', 'MM/DD/YYYY'), 13); Insert into T1 (CODE, DT, PRICE) Values (1, TO_DATE('10/31/2012', 'MM/DD/YYYY'), 13); COMMIT;
I hope I have described the situation well.
Could someone help me with this please?
My actual table contains a few million lines in DEV env and a lot more in PROD.
Thanks in advance!If you use the analytical function LAG you can 'Watch' data of previous lines...
SQL> ed Wrote file afiedt.buf 1 select code, dt, price 2 ,lag(price) over (partition by code order by dt) as prev_price 3* from t1 SQL> / CODE DT PRICE PREV_PRICE ---------- -------------------- ---------- ---------- 1 21-OCT-2012 00:00:00 10 1 22-OCT-2012 00:00:00 10 10 1 23-OCT-2012 00:00:00 12 10 1 24-OCT-2012 00:00:00 9 12 1 25-OCT-2012 00:00:00 8 9 1 26-OCT-2012 00:00:00 13 8 1 27-OCT-2012 00:00:00 11 13 1 28-OCT-2012 00:00:00 15 11 1 30-OCT-2012 00:00:00 13 15 1 31-OCT-2012 00:00:00 13 13 2 29-OCT-2012 00:00:00 15 11 rows selected.
-
Normally, I work on Firefox with several tabs open. I want to pass between two tabs open frequently. Is there a shortcut to do? for example. "Alt + Tab" to open the most recent window on the Windows operating system.
Which probably only works if you turn on the Preview tab control.
You can set the pref browser.ctrlTab.previews true on the topic: config page.
To open the topic: config page, type Subject: config in the address bar (address) and press the 'Enter' key, as you type the url of a Web site to open a Web site.
If you see a warning then you can confirm that you want to access this page.- Use the filter at the top bar of the on: page config to more easily spot a preference.
- Preferences that have changed see the bold (user set).
- Preferences you can restore the default value or change via the context menu.
-
Path of the most recent added file using applescript
I use appleScript Automator to download new pictures on my Instagram.
The script trigger when the new file is added to a folder "updates".
Open the app (work)
activate an application "Uploader HD for Instagram"
delay 0.5
Tell application "system events".
say "Uploader HD for Instagram" processes
Click on the menu "open...". "the menu 1 menu bar item 'File' from the menu bar 1
tell the end
tell the end
Activate the "go in the folder" CMD + SHIFT + G
Tell application "system events".
delay 1
combination of keys 'G' using {control down, moving down}
delay 1
tell the end
This is the problem... I "Don't KNOW" the name of the most recent added the file and there are a lot of files on the folder... So I can't use the full path of the file on the 'go in the folder ".
Tell application "system events".
combination of keys "/ Users/HazaelDiaz/Google Drive/IFTTT/Instagram/update/2016 / '.
delay of 0.1
strike back
delay of 0.1
strike back
tell the end
Since I trigger the 'applescrip' using the 'Workflow folder action... " Is it possible that I can get the value or the path of the new file included?
I found a code that renames all the files from 0 to xxx folder action, but the new included file is always the last of them on digital process... is possible to rename the files and give the new file name "update1.jpg" first?
Also I can order "Go to folder" action must seek that specify the file: 'update1.jpg. '
This is the script name change: (BTW, these scripts always ask me to select folder... and what I want is to be automated out of my interaction with but do not know how to change so it will always use the "updates" folder
Tell application "Finder".
a in each file of the entire contents of the value (choose the folder)
Repeat with aa in one
the file_name my MakeBase (aa AsString) value
If file_name is not 'JUMP' then
count_er Set 1
the value all_files (all files in aa)
Repeat the operation with ff in all_files
the name value of ff ((texte-3-1 par le biais de ("000" & (count_er as string))) & "." & (name extension for ff))
Set count_er to count_er + 1
end repeat
end if
end repeat
tell the end
to MakeBase (txt)
the value astid delimiters to point to the text of the AppleScript
the text value of the point AppleScript delimiters «:»
the value for each item of text txt new_Name_Raw
the text value of point AppleScript delimiters to "_".
the value final_Name for each item in new_Name_Raw text text
the text value of the point AppleScript astid delimiters
If length > 251 of final_Name then set final_Name on 'SKIP' - will be more than 4 characters for counter
return final_Name
end MakeBase
Any help will be much appreciated.
Thanks /.
What version of Mac OS X are you running?
-
How can I put pictures in the most recent at the top of the screen while I scroll more recent instead of to the top?
The album "All Photos" can only be sorted by date, oldest first.
But you can create your own album of all the Photos in a smart album, which keeps all the photoss. A custom Smarta album can be sorted in descending order, most recent photos first.
My album ' my photo all the "custom is defined as: a rule 'Date is after', with a date range beginning well before the oldest photo in the library, then everything will be included, and I added a"Photo is not hidden,"so hidden photos will be excluded.
To sort descending album ctrl-click in the sidebar and value 'out' 'Keep sorted by date, most recent first':
-
The most recent data in a table view
I'm adding values to a bulletin board as in the example, but I want to be the most recent data for the user to see the top line.
He keeps adding to the bottom, and then the user will have to Diecut down see all data. Can I select the most recent data somehow or get auto-scrolling data table are applied? I tried registers to shift as well, but no luck.
Here's my VI
Thank you
Mike
Have you read the help of the function insert in the table? He clearly says that if you leave the unwired index entries, it will insert at the end. So, don't let the unwired index entries. Wire a '0' to the row index.
Maybe you are looking for
-
I was looking through my e-mails and I deleted an email and they're all gone. That's happened? It says my Inbox is empty and I had more than 200 messages in less than a minute. There are a few important emails that I kept in it.
-
Some Flash videos will play not (e.g. uStream live)
I have trouble to get some videos to play. None of the live streams on www.ustream.tv work. No more videos on www.mtv.ca, neither those on www.kelbytraining.com. They all used to work perfectly. Now, I just get a perpetual loading graph. They all wor
-
Is there a better way to generate the custom timed digital signals
I'm trying to generate the digital output from the top and down with delays on different lines. Each daq assistant is activate single line on a port USB 6501. There more complex high and lows that I need to generate variable time difference between h
-
I am trying to build a simple low-pass filter. When it is connected not only the + 15 V and yet are connected to a Council of naked I do not get the error, but once they are connected to the op amp, I get the error. No idea what I need to do?
-
How to make screenshot on my iconia tab 8 W?
How to make screenshot on my iconia tab 8 W? I've tried the power button with the volume up/down button but it does not work. Help, please.